Client or integration
Claude Code
Area
Catalog / models
Summary
The static native catalog advertises gpt-5.6-sol, gpt-5.6-terra, and gpt-5.6-luna as selectable native OpenAI rows regardless of what the authenticated ChatGPT account's own model roster supports. On a free ChatGPT plan every request for these models is forwarded and rejected upstream with:
The 'gpt-5.6-sol' model is not supported when using Codex with a ChatGPT account.
OpenCodex relays this as a 502 (upstream_server_error), which Claude Code surfaces as 502 upstream stream ended before a terminal frame (truncated response) and then retries 10 times. The user-visible symptom blames the stream/truncation, while the real cause is an entitlement gap: the picker offers models the account cannot use.
This is the same class as #2097, which added per-account roster gating for gpt-daybreak-blue-latest (ACCOUNT_GATED_NATIVE_OPENAI_MODELS). That gate currently contains only Daybreak; the GPT-5.6 family needs the same treatment (they are absent from a free account's authenticated /models roster).
Expected: account-gated native models are only advertised (Claude gateway discovery, Codex catalog, management rows) and routed when the authenticated account's roster confirms them; otherwise they are hidden or fail closed before dispatch.
Reproduction
- Log in with a free ChatGPT account (
codex login); ocx provider test openai reports connected (forward auth).
- Launch Claude Code through the proxy:
ocx claude --model claude-ocx-native--gpt-5.6-sol.
- Send any prompt.
- Observe the retry loop:
✻ 502 upstream stream ended before a terminal frame (truncated response) · Retrying in 2s · attempt 4/10.
- Check
~/.opencodex/usage.jsonl: each attempt records status: 502, errorCode: upstream_server_error, upstreamError: The 'gpt-5.6-sol' model is not supported when using Codex with a ChatGPT account.
ocx account refresh openai shows the account plan is free.
Consistently reproducible. gpt-5.6-luna and gpt-5.6-terra are expected to behave the same (all three ship in the static native list and none appear in a free account's roster).
Version
2.32.1
Operating system
Ubuntu 24.04 (WSL2)
Provider and model
openai (ChatGPT login, authMode: forward, codexAccountMode: direct) / gpt-5.6-sol (also expect gpt-5.6-terra, gpt-5.6-luna)
Logs or error output
$ tail -n 40 ~/.opencodex/usage.jsonl | jq -r 'select(.surface=="claude") | [.status,.provider,.requestedModel,.errorCode,.upstreamError] | @tsv'
502 openai gpt-5.6-sol upstream_server_error The 'gpt-5.6-sol' model is not supported when using Codex with a ChatGPT account.
502 openai gpt-5.6-sol upstream_server_error The 'gpt-5.6-sol' model is not supported when using Codex with a ChatGPT account.
502 openai gpt-5.6-sol upstream_server_error The 'gpt-5.6-sol' model is not supported when using Codex with a ChatGPT account.
...repeats for every retry attempt
Claude Code side:
✻ 502 upstream stream ended before a terminal frame (truncated response) · Retrying in 2s · attempt 4/10
Redacted configuration
{
"providers": {
"openai": {
"adapter": "openai-responses",
"baseUrl": "https://chatgpt.com/backend-api/codex",
"authMode": "forward",
"codexAccountMode": "direct"
}
}
}
Suggested fix direction
Extend the #2097 mechanism: add gpt-5.6-sol, gpt-5.6-terra, and gpt-5.6-luna to ACCOUNT_GATED_NATIVE_OPENAI_MODELS (src/codex/catalog/native-models.ts) so catalog generation, Claude gateway discovery, management rows, and Pool/Direct routing all require the authenticated per-account /models roster before advertising or dispatching them. I have a local patch along these lines (with updated tests across entitlement/catalog/convergence/auth suites) and can open a PR after review.
Checks
Client or integration
Claude Code
Area
Catalog / models
Summary
The static native catalog advertises
gpt-5.6-sol,gpt-5.6-terra, andgpt-5.6-lunaas selectable native OpenAI rows regardless of what the authenticated ChatGPT account's own model roster supports. On a free ChatGPT plan every request for these models is forwarded and rejected upstream with:OpenCodex relays this as a 502 (
upstream_server_error), which Claude Code surfaces as502 upstream stream ended before a terminal frame (truncated response)and then retries 10 times. The user-visible symptom blames the stream/truncation, while the real cause is an entitlement gap: the picker offers models the account cannot use.This is the same class as #2097, which added per-account roster gating for
gpt-daybreak-blue-latest(ACCOUNT_GATED_NATIVE_OPENAI_MODELS). That gate currently contains only Daybreak; the GPT-5.6 family needs the same treatment (they are absent from a free account's authenticated/modelsroster).Expected: account-gated native models are only advertised (Claude gateway discovery, Codex catalog, management rows) and routed when the authenticated account's roster confirms them; otherwise they are hidden or fail closed before dispatch.
Reproduction
codex login);ocx provider test openaireports connected (forward auth).ocx claude --model claude-ocx-native--gpt-5.6-sol.✻ 502 upstream stream ended before a terminal frame (truncated response) · Retrying in 2s · attempt 4/10.~/.opencodex/usage.jsonl: each attempt recordsstatus: 502,errorCode: upstream_server_error,upstreamError: The 'gpt-5.6-sol' model is not supported when using Codex with a ChatGPT account.ocx account refresh openaishows the account plan isfree.Consistently reproducible.
gpt-5.6-lunaandgpt-5.6-terraare expected to behave the same (all three ship in the static native list and none appear in a free account's roster).Version
2.32.1
Operating system
Ubuntu 24.04 (WSL2)
Provider and model
openai (ChatGPT login,
authMode: forward,codexAccountMode: direct) /gpt-5.6-sol(also expectgpt-5.6-terra,gpt-5.6-luna)Logs or error output
Claude Code side:
Redacted configuration
{ "providers": { "openai": { "adapter": "openai-responses", "baseUrl": "https://chatgpt.com/backend-api/codex", "authMode": "forward", "codexAccountMode": "direct" } } }Suggested fix direction
Extend the #2097 mechanism: add
gpt-5.6-sol,gpt-5.6-terra, andgpt-5.6-lunatoACCOUNT_GATED_NATIVE_OPENAI_MODELS(src/codex/catalog/native-models.ts) so catalog generation, Claude gateway discovery, management rows, and Pool/Direct routing all require the authenticated per-account/modelsroster before advertising or dispatching them. I have a local patch along these lines (with updated tests across entitlement/catalog/convergence/auth suites) and can open a PR after review.Checks