Skip to content

Feature request: OpenAI Responses API (/v1/responses) for Codex compatibility #247

Description

@roycema-vibecoding

Summary

Please add an OpenAI Responses API endpoint (POST /v1/responses) so that OpenAI Codex (CLI, desktop app, and IDE extensions) can use Kiro Gateway as a custom model provider.

Problem / Motivation

Codex custom providers now only support wire_api = "responses" (the OpenAI Responses API). Support for wire_api = "chat" (Chat Completions) was deprecated in early 2026 and can cause Codex to fail on startup.

Kiro Gateway currently exposes only:

  • /v1/chat/completions (OpenAI Chat Completions)
  • /v1/messages (Anthropic Messages)

Because there is no /v1/responses endpoint, Codex cannot connect to the gateway (its requests hit a non-existent route). Tools that speak Chat Completions or Anthropic Messages (Claude Code, Cursor, Cline, etc.) work fine, but Codex does not.

For reference, AWS added a Responses-API-compatible surface to Amazon Bedrock specifically so OpenAI tools like Codex could connect. An equivalent adapter in Kiro Gateway would let it serve Codex while reusing Kiro subscriptions.

Proposed solution

Add a Responses API adapter mirroring the existing OpenAI/Anthropic layers and reusing the shared Core layer:

  • kiro/models_responses.py - Pydantic models for the Responses request/response (input items, instructions, tools, previous_response_id, etc.)
  • kiro/converters_responses.py - Responses -> Kiro payload (reuse converters_core.build_kiro_payload)
  • kiro/streaming_responses.py - Kiro events -> Responses SSE events (response.created, response.output_text.delta, response.completed, tool-call events, ...)
  • kiro/routes_responses.py - POST /v1/responses (reuse verify_api_key)
  • Register the router in main.py

Additional context

  • Codex + custom provider requires wire_api = "responses".
  • Streaming semantics differ from Chat Completions (event-typed SSE), so a Responses-specific formatter over streaming_core is likely needed.

Thanks for the project!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions