Client or integration
Codex CLI and Codex App
Provider or upstream service
GitHub Copilot
OpenCodex version
2.10.2 (local validation branch agent/github-copilot-responses-compat)
Endpoint or capability
POST /v1/responses streaming, reasoning output, function-tool calls, and custom-tool calls.
Current behaviour
Authenticated GitHub Copilot Responses streams can contain Copilot-specific encrypted reasoning fields, obfuscation payloads, and provider-generated item ids. Tool argument input can arrive as obfuscated or padded deltas instead of the plaintext OpenAI Responses event contract. When these frames are passed through unchanged, Codex clients can remain in “reasoning in progress”, fail to decode a tool call, or never observe a usable terminal item.
Expected behaviour
The proxy should expose a valid OpenAI Responses SSE stream to Codex clients: stable response and item ids, canonical event names, readable tool input deltas/completions, no provider-only encrypted or obfuscation fields, and a terminal response.completed followed by [DONE].
Minimal redacted request or reproduction
curl -N http://127.0.0.1:10101/v1/responses \
-H 'content-type: application/json' \
--data '{
"model": "github-copilot/gpt-5.6-luna",
"input": "Call diagnostic_echo once with the marker copilot-stream-ok.",
"tools": [{"type":"function","name":"diagnostic_echo","parameters":{"type":"object"}}],
"tool_choice": "required",
"stream": true,
"store": false
}'
The request is redacted and contains no access token or account identifier.
Actual response or error
Before normalization, observed streams included encrypted_content and obfuscation fields and provider-specific ids. A Codex-facing probe could receive a non-canonical tool stream such as:
event: response.output_item.added
data: {"item":{"type":"function_call","id":"provider-item-id"}}
event: response.function_call_arguments.delta
data: {"delta":"<obfuscated or padded provider payload>"}
The HTTP status was 200, but the client-visible stream was not consumable as an OpenAI Responses stream.
Upstream documentation
The public OpenAI Responses event contract is documented at https://platform.openai.com/docs/api-reference/responses. GitHub Copilot's authenticated Responses wire format does not currently have a complete public SSE specification; the incompatibility is observed from the provider endpoint and compared with the OpenAI Responses contract required by Codex clients.
Suggested mapping or implementation notes
Apply a provider-specific client-facing repair after the Copilot upstream stream is decoded: pin the first response/item ids, remove encrypted_content and obfuscation, defer function/custom input deltas until their .done payload is available, and emit the canonical Responses event sequence. Keep raw provider frames available to diagnostics and continuation logic.
Additional context and attachments
Checks
Client or integration
Codex CLI and Codex App
Provider or upstream service
GitHub Copilot
OpenCodex version
2.10.2 (local validation branch
agent/github-copilot-responses-compat)Endpoint or capability
POST /v1/responsesstreaming, reasoning output, function-tool calls, and custom-tool calls.Current behaviour
Authenticated GitHub Copilot Responses streams can contain Copilot-specific encrypted reasoning fields, obfuscation payloads, and provider-generated item ids. Tool argument input can arrive as obfuscated or padded deltas instead of the plaintext OpenAI Responses event contract. When these frames are passed through unchanged, Codex clients can remain in “reasoning in progress”, fail to decode a tool call, or never observe a usable terminal item.
Expected behaviour
The proxy should expose a valid OpenAI Responses SSE stream to Codex clients: stable response and item ids, canonical event names, readable tool input deltas/completions, no provider-only encrypted or obfuscation fields, and a terminal
response.completedfollowed by[DONE].Minimal redacted request or reproduction
The request is redacted and contains no access token or account identifier.
Actual response or error
Before normalization, observed streams included
encrypted_contentandobfuscationfields and provider-specific ids. A Codex-facing probe could receive a non-canonical tool stream such as:The HTTP status was
200, but the client-visible stream was not consumable as an OpenAI Responses stream.Upstream documentation
The public OpenAI Responses event contract is documented at https://platform.openai.com/docs/api-reference/responses. GitHub Copilot's authenticated Responses wire format does not currently have a complete public SSE specification; the incompatibility is observed from the provider endpoint and compared with the OpenAI Responses contract required by Codex clients.
Suggested mapping or implementation notes
Apply a provider-specific client-facing repair after the Copilot upstream stream is decoded: pin the first response/item ids, remove
encrypted_contentandobfuscation, defer function/custom input deltas until their.donepayload is available, and emit the canonical Responses event sequence. Keep raw provider frames available to diagnostics and continuation logic.Additional context and attachments
Checks