Skip to content

Comments

Add Responses API support for OpenRouter provider#1528

Open
chtushar wants to merge 2 commits intoPortkey-AI:mainfrom
chtushar:chtushar/openrouter-responses-api
Open

Add Responses API support for OpenRouter provider#1528
chtushar wants to merge 2 commits intoPortkey-AI:mainfrom
chtushar:chtushar/openrouter-responses-api

Conversation

@chtushar
Copy link

@chtushar chtushar commented Feb 18, 2026

Description:

  • Added endpoint mappings for OpenRouter Responses API: POST /v1/responses, GET /v1/responses/:id, DELETE /v1/responses/:id, GET /v1/responses/:id/input_items
  • Reuses open-ai-base infrastructure for request parameter mapping and response transformation
  • Supports OpenRouter-specific parameters: provider routing, plugins, top_k, frequency_penalty, presence_penalty, session_id, and trace
  • Both streaming and non-streaming modes are supported via native SSE passthrough and JSON-to-stream conversion for cache hits

Tests Run/Test cases added:

  • Type-checked with TypeScript compiler (no new errors introduced)
  • Build succeeds with Rollup
  • All existing gateway unit tests pass (47/47)

Type of Change:

  • New feature (non-breaking change which adds functionality)

Fixes
#1527

Implement support for the OpenRouter Responses API endpoints by adding
endpoint mappings and configuration for POST /v1/responses, GET
/v1/responses/:id, DELETE /v1/responses/:id, and GET /v1/responses/:id/input_items.

Reuses the open-ai-base infrastructure for request parameter mapping and
response transformation. Supports OpenRouter-specific parameters including
provider routing, plugins, sampling, penalties, session management, and tracing.
@chtushar chtushar marked this pull request as ready for review February 18, 2026 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant