You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add an optional, default-disabled POST /v1/responses endpoint so native
OpenAI clients can use stored Codex authentication without Anthropic protocol
translation.
Preserve native JSON and SSE behavior, replace incoming credentials, refresh
rejected access tokens, validate Codex models, filter response headers, and
record bounded monitor and traffic data. Images API and stored response routes
remain outside the supported surface.
|`CCP_CODEX_BASE_URL`|`codex.baseUrl`|`https://chatgpt.com/backend-api/codex/responses`| Override the Codex Responses endpoint |
735
739
|`CCP_CODEX_TRANSPORT`|`codex.transport`|`websocket`| Codex transport: `websocket`, `http`, or `auto`|
736
740
|`CCP_CODEX_PREVIOUS_RESPONSE_ID`|`codex.previousResponseId`|`false`| Enable WebSocket continuation with `previous_response_id` when the request is append-only |
741
+
|`CCP_CODEX_RESPONSES_API`|`codex.responsesApi`|`false`| Enable `POST /v1/responses` with native OpenAI Responses request, JSON response, and SSE behavior using stored Codex authentication |
737
742
|`CCP_CODEX_ORIGINATOR`|`codex.originator`|`claude-code-proxy`| Override the `originator` header sent to Codex |
738
743
|`CCP_CODEX_USER_AGENT`|`codex.userAgent`|`claude-code-proxy/<version>`| Override the `User-Agent` header sent to Codex |
739
744
|`CCP_KIMI_USER_AGENT`|`kimi.userAgent`|`KimiCLI/1.37.0`| Override the `User-Agent` header sent to Kimi |
@@ -750,6 +755,14 @@ A malformed `config.json` is reported on stderr and ignored; defaults are used
750
755
in its place. Invalid types for individual keys are warned and skipped without
751
756
affecting other keys.
752
757
758
+
`CCP_CODEX_RESPONSES_API=1` enables `POST /v1/responses` for clients that use
759
+
OpenAI's native Responses protocol. The route replaces incoming credentials with
760
+
the proxy's stored Codex authentication, refreshes rejected access tokens before
761
+
forwarding a response, and preserves native JSON or SSE response bodies. The
762
+
route accepts Codex models listed by `claude-code-proxy models`; Images API,
763
+
stored response retrieval and deletion, and WebSocket ingress are outside its
764
+
scope.
765
+
753
766
Codex uses the WebSocket Responses transport by default. Set
754
767
`CCP_CODEX_TRANSPORT=http` to use the older HTTP SSE transport for debugging or
755
768
compatibility, or `CCP_CODEX_TRANSPORT=auto` to try WebSocket with HTTP fallback
0 commit comments