Summary
Claude Code Proxy 0.1.15 returns HTTP 502 with Model not found: gpt-5.6-luna when it sends a Luna request through the Codex Responses Lite endpoint.
The same ChatGPT OAuth account and model work in Codex CLI 0.144.1 over both WebSocket and HTTP. A controlled request matrix points to the product identity in originator and User-Agent. CCP sends originator: codex_cli_rs for Responses Lite, while its default User-Agent is claude-code-proxy/0.1.15. The backend rejects that combination with HTTP 404.
Environment
- Claude Code Proxy 0.1.15
- Codex CLI 0.144.1
- Fedora 44, x86_64
- ChatGPT OAuth authentication
- Codex transport: HTTP
- Claude Code model value:
gpt-5.6-luna[1m]
- Upstream model value:
gpt-5.6-luna
The account's model cache reports gpt-5.6-luna with supported_in_api: true and use_responses_lite: true.
Reproduction
- Authenticate CCP with ChatGPT OAuth.
- Start CCP without overriding
CCP_CODEX_USER_AGENT.
- Send a request through its Anthropic-compatible endpoint:
curl --fail-with-body --no-buffer \
'http://127.0.0.1:18765/v1/messages?beta=true' \
-H 'content-type: application/json' \
-H 'anthropic-version: 2023-06-01' \
-H 'x-api-key: unused' \
--data '{
"model": "gpt-5.6-luna[1m]",
"max_tokens": 64,
"stream": false,
"messages": [{"role": "user", "content": "Reply with luna-ok"}]
}'
CCP returns HTTP 502. Its upstream error is Model not found: gpt-5.6-luna.
Control results
Using the same OAuth account:
- Codex CLI 0.144.1 over WebSocket succeeds.
- Codex CLI 0.144.1 forced to HTTP succeeds.
- A direct upstream request with CCP's default client identity returns HTTP 404.
I reproduced the issue with fresh CCP containers. Every case used the same image, OAuth files, HTTP transport, request body, and model. Only CCP_CODEX_USER_AGENT changed. CCP keeps the Responses Lite originator fixed at codex_cli_rs in all these cases.
originator |
User-Agent |
CCP result |
codex_cli_rs |
claude-code-proxy/0.1.15 |
HTTP 502, upstream Model not found |
codex_cli_rs |
codex_exec/0.144.1 ... |
HTTP 502, upstream Model not found |
codex_cli_rs |
codex_cli_rs/0.144.1 ... |
HTTP 200 |
codex_cli_rs |
codex_cli_rs/0.144.1 |
HTTP 200 |
codex_cli_rs |
codex_cli_rs/0.1.15 |
HTTP 200 |
codex_cli_rs |
codex_cli_rs |
HTTP 200 |
The full Codex CLI User-Agent and its version are not required in this environment. The bare codex_cli_rs value works. This narrows the trigger to the product identity rather than a specific Codex CLI version or platform suffix.
This test does not establish an official backend contract. It records the current routing behavior observed with this OAuth account and environment.
Relevant CCP behavior
src/providers/codex/auth/constants.rs defines the Responses Lite originator as codex_cli_rs:
pub const RESPONSES_LITE_ORIGINATOR: &str = "codex_cli_rs";
src/providers/codex/client.rs uses that value for Responses Lite requests, but builds the default User-Agent separately:
let originator = if use_responses_lite {
RESPONSES_LITE_ORIGINATOR.to_string()
} else {
config::codex_originator(ORIGINATOR)
};
let user_agent =
config::codex_user_agent(&format!("claude-code-proxy/{}", env!("CARGO_PKG_VERSION")));
This produces the failing pair:
originator: codex_cli_rs
User-Agent: claude-code-proxy/0.1.15
Workaround
Setting a User-Agent whose product identity matches the Responses Lite originator fixes the request in this environment:
CCP_CODEX_USER_AGENT: "codex_cli_rs"
After restarting CCP, the same Luna request returns HTTP 200 and luna-ok.
Expected behavior
CCP should use a matching User-Agent product identity when it switches the Responses Lite originator to codex_cli_rs, or document the required CCP_CODEX_USER_AGENT override. A regression test should cover the originator and User-Agent pair used for Responses Lite requests.
Related reports
Summary
Claude Code Proxy 0.1.15 returns HTTP 502 with
Model not found: gpt-5.6-lunawhen it sends a Luna request through the Codex Responses Lite endpoint.The same ChatGPT OAuth account and model work in Codex CLI 0.144.1 over both WebSocket and HTTP. A controlled request matrix points to the product identity in
originatorandUser-Agent. CCP sendsoriginator: codex_cli_rsfor Responses Lite, while its default User-Agent isclaude-code-proxy/0.1.15. The backend rejects that combination with HTTP 404.Environment
gpt-5.6-luna[1m]gpt-5.6-lunaThe account's model cache reports
gpt-5.6-lunawithsupported_in_api: trueanduse_responses_lite: true.Reproduction
CCP_CODEX_USER_AGENT.CCP returns HTTP 502. Its upstream error is
Model not found: gpt-5.6-luna.Control results
Using the same OAuth account:
I reproduced the issue with fresh CCP containers. Every case used the same image, OAuth files, HTTP transport, request body, and model. Only
CCP_CODEX_USER_AGENTchanged. CCP keeps the Responses Lite originator fixed atcodex_cli_rsin all these cases.originatorUser-Agentcodex_cli_rsclaude-code-proxy/0.1.15Model not foundcodex_cli_rscodex_exec/0.144.1 ...Model not foundcodex_cli_rscodex_cli_rs/0.144.1 ...codex_cli_rscodex_cli_rs/0.144.1codex_cli_rscodex_cli_rs/0.1.15codex_cli_rscodex_cli_rsThe full Codex CLI User-Agent and its version are not required in this environment. The bare
codex_cli_rsvalue works. This narrows the trigger to the product identity rather than a specific Codex CLI version or platform suffix.This test does not establish an official backend contract. It records the current routing behavior observed with this OAuth account and environment.
Relevant CCP behavior
src/providers/codex/auth/constants.rsdefines the Responses Lite originator ascodex_cli_rs:src/providers/codex/client.rsuses that value for Responses Lite requests, but builds the default User-Agent separately:This produces the failing pair:
Workaround
Setting a User-Agent whose product identity matches the Responses Lite originator fixes the request in this environment:
After restarting CCP, the same Luna request returns HTTP 200 and
luna-ok.Expected behavior
CCP should use a matching User-Agent product identity when it switches the Responses Lite originator to
codex_cli_rs, or document the requiredCCP_CODEX_USER_AGENToverride. A regression test should cover theoriginatorandUser-Agentpair used for Responses Lite requests.Related reports
Model not foundsymptom and was later considered fixed.