Client or integration
Codex App (Desktop) through OpenCodex loopback proxy integration.
Area
Proxy and routing
Summary
A thread that previously used gpt-5.6-sol can be switched in-place to the routed model deepseek/deepseek-v4-flash, and a manual /compact succeeds with the current routed DeepSeek model. However, the next normal user turn triggers Codex's pre-sampling previous-model compaction. The first compaction attempt intentionally uses the previous model (gpt-5.6-sol). If the Sol/ChatGPT quota is exhausted, OpenCodex records that compact attempt as an upstream failure and the turn stops before the current routed DeepSeek model can continue.
Observed failing compact record:
provider=openai
model=gpt-5.6-sol
status=502
code=upstream_server_error
termination=incomplete
error=The usage limit has been reached
No subsequent compact retry to deepseek/deepseek-v4-flash was observed for that blocked turn.
This report is not claiming that the first previous-model compact attempt is incorrect. Upstream Codex intentionally performs previous-model pre-sampling compaction during some model transitions. The compatibility problem is that, through OpenCodex's same-thread routed-model setup, a quota failure on the previous OpenAI model prevents the handoff to the already-working current routed model.
Upstream Codex has also broadened previous-model compact fallback to include usage-limit, unexpected-status, server and exhausted-retry failures:
Expected OpenCodex behavior is one of the following, depending on what context is available at the proxy layer:
- Preserve/translate the previous-model quota failure so Codex can trigger its selected/current-model compact fallback; or
- provide an equivalent OpenCodex compatibility fallback from the unavailable previous route to the current routed model; or
- if neither is safe, surface/document this limitation explicitly instead of leaving the routed thread blocked by the previous provider's quota.
Reproduction
- Run OpenCodex
2.31.0 with Codex App loopback integration and a routed DeepSeek model available as deepseek/deepseek-v4-flash.
- Start or resume a thread that has been using
gpt-5.6-sol.
- Exhaust the ChatGPT/OpenAI usage allowance for
gpt-5.6-sol.
- In the same thread, switch the current model to
deepseek/deepseek-v4-flash.
- Run
/compact manually.
- Observe that manual compaction succeeds with the current routed model.
- Send a normal user message to continue the thread.
- Codex performs pre-sampling model-transition compaction against the previous model
gpt-5.6-sol.
- OpenCodex records the compact request as
provider=openai, model=gpt-5.6-sol, status=502, error=The usage limit has been reached.
- The turn stops; no DeepSeek compact fallback is observed.
- After the Sol quota resets, the same model-switch workflow can continue normally again.
This reproduces a narrow handoff failure: DeepSeek compaction itself is usable, but the previous-model pre-sampling compact failure blocks continuation before the routed current model gets control.
Version
OpenCodex 2.31.0
Operating system
Windows x64 (NT 10.0; exact edition/build not captured)
Provider and model
Previous model/provider:
OpenAI / ChatGPT
model=gpt-5.6-sol
Current routed model:
DeepSeek via OpenCodex
model=deepseek/deepseek-v4-flash
Logs or error output
Error running remote compact task: stream disconnected before completion:
stream closed before response.completed
Matching OpenCodex usage record at the compact failure timestamp:
provider=openai
model=gpt-5.6-sol
status=502
code=upstream_server_error
termination=incomplete
error=The usage limit has been reached
Control observation:
manual /compact on current routed DeepSeek -> succeeds
next normal turn -> previous-model Sol pre-compact -> quota failure -> turn blocked
Sol quota reset -> model-switch workflow works again
Screenshots and supporting files
Relevant upstream Codex behavior/fixes:
Relevant OpenCodex compact routing implementation:
Redacted configuration
{
"note": "Credentials, account identifiers, unrelated providers, and secrets removed",
"routedModel": "deepseek/deepseek-v4-flash",
"integration": "Codex App loopback proxy"
}
Checks
Client or integration
Codex App (Desktop) through OpenCodex loopback proxy integration.
Area
Proxy and routing
Summary
A thread that previously used
gpt-5.6-solcan be switched in-place to the routed modeldeepseek/deepseek-v4-flash, and a manual/compactsucceeds with the current routed DeepSeek model. However, the next normal user turn triggers Codex's pre-sampling previous-model compaction. The first compaction attempt intentionally uses the previous model (gpt-5.6-sol). If the Sol/ChatGPT quota is exhausted, OpenCodex records that compact attempt as an upstream failure and the turn stops before the current routed DeepSeek model can continue.Observed failing compact record:
No subsequent compact retry to
deepseek/deepseek-v4-flashwas observed for that blocked turn.This report is not claiming that the first previous-model compact attempt is incorrect. Upstream Codex intentionally performs previous-model pre-sampling compaction during some model transitions. The compatibility problem is that, through OpenCodex's same-thread routed-model setup, a quota failure on the previous OpenAI model prevents the handoff to the already-working current routed model.
Upstream Codex has also broadened previous-model compact fallback to include usage-limit, unexpected-status, server and exhausted-retry failures:
Expected OpenCodex behavior is one of the following, depending on what context is available at the proxy layer:
Reproduction
2.31.0with Codex App loopback integration and a routed DeepSeek model available asdeepseek/deepseek-v4-flash.gpt-5.6-sol.gpt-5.6-sol.deepseek/deepseek-v4-flash./compactmanually.gpt-5.6-sol.provider=openai,model=gpt-5.6-sol,status=502,error=The usage limit has been reached.This reproduces a narrow handoff failure: DeepSeek compaction itself is usable, but the previous-model pre-sampling compact failure blocks continuation before the routed current model gets control.
Version
OpenCodex
2.31.0Operating system
Windows x64 (NT 10.0; exact edition/build not captured)
Provider and model
Previous model/provider:
Current routed model:
Logs or error output
Matching OpenCodex usage record at the compact failure timestamp:
Control observation:
Screenshots and supporting files
Relevant upstream Codex behavior/fixes:
Relevant OpenCodex compact routing implementation:
Redacted configuration
{ "note": "Credentials, account identifiers, unrelated providers, and secrets removed", "routedModel": "deepseek/deepseek-v4-flash", "integration": "Codex App loopback proxy" }Checks