Client or integration
VS Code / GitHub Copilot (via /v1/responses BYOK endpoint)
Provider or upstream service
ChatGPT Codex forward / openai-responses
OpenCodex version
2.34.0
Endpoint or capability
/v1/responses, OpenAI Responses adapter
Current behaviour
Following the fixes in #2668 and #2648, VS Code / GitHub Copilot requests to gpt-5.6-luna (and other native forward models) now still fail when the client includes top-level "prompt_cache_options" (e.g. {"prompt_cache_options": { ... }}) in the /v1/responses request.
OpenCodex forwards this payload directly to the ChatGPT Codex backend, which rejects it with HTTP 502:
{
"status": 502,
"errorCode": "upstream_server_error",
"upstreamError": "Unsupported parameter: prompt_cache_options"
}
As a result, VS Code Copilot fails on turn start with generic code: 0 / "The model provider reported a failed response without any error details".
Expected behaviour
The openai-responses forward adapter should automatically strip the unsupported prompt_cache_options parameter when dispatching to the canonical ChatGPT Codex forward backend (isCanonicalOpenAiForwardProvider / authMode === "forward"), similar to how truncation is stripped in #2668 / #2672.
Additionally, src/responses/schema.ts (responsesRequestSchema) should accept prompt_cache_options: z.unknown().optional() so valid Responses API requests containing prompt cache options pass schema validation.
Minimal redacted request or reproduction
- Send a request to
POST http://127.0.0.1:7861/v1/responses:
{
"model": "gpt-5.6-luna",
"store": false,
"stream": true,
"truncation": "disabled",
"prompt_cache_options": {
"ttl": 3600
},
"input": [
{
"type": "message",
"role": "user",
"content": [
{
"type": "input_text",
"text": "hi"
}
]
}
]
}
- Request fails with HTTP 502 (
Unsupported parameter: prompt_cache_options).
Actual response or error
{
"status": 502,
"errorCode": "upstream_server_error",
"upstreamError": "Unsupported parameter: prompt_cache_options"
}
Upstream documentation
https://platform.openai.com/docs/api-reference/responses
Suggested mapping or implementation notes
-
In src/responses/schema.ts:
Add prompt_cache_options: z.unknown().optional() to responsesRequestSchema.
-
In src/adapters/openai-responses.ts:
Strip prompt_cache_options in normalizeCanonicalForwardPromptEnvelope or stripUnsupportedForwardParams when dispatching to the canonical ChatGPT Codex forward destination.
Checks
Client or integration
VS Code / GitHub Copilot (via
/v1/responsesBYOK endpoint)Provider or upstream service
ChatGPT Codex forward /
openai-responsesOpenCodex version
2.34.0
Endpoint or capability
/v1/responses, OpenAI Responses adapterCurrent behaviour
Following the fixes in #2668 and #2648, VS Code / GitHub Copilot requests to
gpt-5.6-luna(and other native forward models) now still fail when the client includes top-level"prompt_cache_options"(e.g.{"prompt_cache_options": { ... }}) in the/v1/responsesrequest.OpenCodex forwards this payload directly to the ChatGPT Codex backend, which rejects it with HTTP 502:
{ "status": 502, "errorCode": "upstream_server_error", "upstreamError": "Unsupported parameter: prompt_cache_options" }As a result, VS Code Copilot fails on turn start with generic
code: 0/"The model provider reported a failed response without any error details".Expected behaviour
The
openai-responsesforward adapter should automatically strip the unsupportedprompt_cache_optionsparameter when dispatching to the canonical ChatGPT Codex forward backend (isCanonicalOpenAiForwardProvider/authMode === "forward"), similar to howtruncationis stripped in #2668 / #2672.Additionally,
src/responses/schema.ts(responsesRequestSchema) should acceptprompt_cache_options: z.unknown().optional()so valid Responses API requests containing prompt cache options pass schema validation.Minimal redacted request or reproduction
POST http://127.0.0.1:7861/v1/responses:{ "model": "gpt-5.6-luna", "store": false, "stream": true, "truncation": "disabled", "prompt_cache_options": { "ttl": 3600 }, "input": [ { "type": "message", "role": "user", "content": [ { "type": "input_text", "text": "hi" } ] } ] }Unsupported parameter: prompt_cache_options).Actual response or error
{ "status": 502, "errorCode": "upstream_server_error", "upstreamError": "Unsupported parameter: prompt_cache_options" }Upstream documentation
https://platform.openai.com/docs/api-reference/responses
Suggested mapping or implementation notes
In
src/responses/schema.ts:Add
prompt_cache_options: z.unknown().optional()toresponsesRequestSchema.In
src/adapters/openai-responses.ts:Strip
prompt_cache_optionsinnormalizeCanonicalForwardPromptEnvelopeorstripUnsupportedForwardParamswhen dispatching to the canonical ChatGPT Codex forward destination.Checks