Problem
With billion-context 0.1.95 proxying Codex through https://chatgpt.com/backend-api/codex/responses, an over-window request enters preflight compression, but the summary request is rejected with:
{"detail":"Unsupported parameter: max_output_tokens"}
Bili then returns HTTP 502 (preflight compression could not bring it under ... HTTP 400). Repeated client retries cannot recover the session.
Reproduction
- Use the Codex ChatGPT Responses backend with valid authentication (credentials omitted).
- Trigger proxy-side preflight compression for an over-window conversation.
src/preflight.ts builds a Responses summary payload with max_output_tokens: MAX_SUMMARY_OUTPUT_TOKENS.
- The backend rejects that parameter with HTTP 400. A minimal authenticated request with this field reproduces the rejection independently of history size.
Observations
- Ordinary short streaming model requests succeed through the same outbound proxy.
- Existing Bili compression had successfully reduced an earlier turn; context management was active.
- The previous upstream usage was approximately 92k tokens, while the next processed payload was locally estimated at approximately 437k against a configured 272k budget. These are different measurements, not proof of a tokenizer defect.
- The immediate blocker is the unsupported summary parameter. The source of the payload growth is not yet established.
- Existing summary fallback handles
stream must be true, but not this parameter rejection.
Expected behavior
Generate a compatible summary request for the Codex ChatGPT backend (or narrowly learn/retry the explicitly rejected optional parameter), while retaining output limits for standard Responses providers and preserving the preflight overflow guard. Cover both summary generation and successful recovery/forwarding in regression tests.
No credentials, session contents, or private host configuration are included. We are preparing a minimal local fix to restore availability.
Problem
With billion-context 0.1.95 proxying Codex through
https://chatgpt.com/backend-api/codex/responses, an over-window request enters preflight compression, but the summary request is rejected with:{"detail":"Unsupported parameter: max_output_tokens"}Bili then returns HTTP 502 (
preflight compression could not bring it under ... HTTP 400). Repeated client retries cannot recover the session.Reproduction
src/preflight.tsbuilds a Responses summary payload withmax_output_tokens: MAX_SUMMARY_OUTPUT_TOKENS.Observations
stream must be true, but not this parameter rejection.Expected behavior
Generate a compatible summary request for the Codex ChatGPT backend (or narrowly learn/retry the explicitly rejected optional parameter), while retaining output limits for standard Responses providers and preserving the preflight overflow guard. Cover both summary generation and successful recovery/forwarding in regression tests.
No credentials, session contents, or private host configuration are included. We are preparing a minimal local fix to restore availability.