-
-
Notifications
You must be signed in to change notification settings - Fork 277
Description
Description
When trying to use the model gpt-5.3-codex-spark through the Codex provider with a regular ChatGPT account (cookies), the request fails with a raw 400 error from the backend:
[2026-02-24 04:30:42] [b3e97ee7] [debug] [codex_executor.go:360] request error, error status: 400, error message: {"detail":"The 'gpt-5.3-codex-spark' model is not supported when using Codex with a ChatGPT account."}
Expected behavior
The proxy should:
- Pre-check model compatibility with the current auth type (ChatGPT cookies vs API key / Plus / Team etc.).
- Return a clear, user-friendly error instead of forwarding the raw backend message.
- Optionally suggest an alternative model or provider (or do automatic fallback where possible).
Context (after full repo review)
- This model was added very recently (PR feat(registry): add gpt-5.3-codex-spark model definition CLIProxyAPI#1574 / commit ~41a78be in the model registry)
- This is NOT a bug in CLIProxyAPIPlus — it’s a hard limitation of the Codex backend
- Current handling is minimal (just debug log + 400)
- Similar improvements were already implemented for thinking blocks, schema normalization, event ordering (Normalize Codex schema handling #259, fix: handle unexpected 'content_block_start' event order (fixes #4) #11, etc.)
Proposed solution
Add a compatibility check in codex_executor.go (or better at the model registry / provider registration level) for supported account types per model and return a clean 400/422 error with helpful message, for example:
Model gpt-5.3-codex-spark is not supported when using Codex with a regular ChatGPT account (cookies). Requires a Plus/Team/Enterprise account or use a different provider.
I can immediately provide:
- full failing request payload
- my config.yaml
- exact commit I’m testing on
Happy to test any patch and review.