fix(litellm): route chatgpt codex via /responses to dodge Cloudflare challenge#469
Open
samxu01 wants to merge 1 commit into
Open
fix(litellm): route chatgpt codex via /responses to dodge Cloudflare challenge#469samxu01 wants to merge 1 commit into
samxu01 wants to merge 1 commit into
Conversation
…challenge Dev agents (theo/nova/pixel/ops/aria + Cody) were silently running on OpenRouter Nemotron instead of codex. Root cause: with model `chatgpt/gpt-5.4*`, LiteLLM's chatgpt/ provider hits /backend-api/codex/chat/completions, which Cloudflare serves a JS bot-challenge for (HTML, not JSON). The call fails and the router silently falls back to Nemotron with no error surfaced, so it hid for days. The /responses endpoint is NOT challenged. Prefixing the model with `responses/` (`chatgpt/responses/gpt-5.4*`) forces it. Verified 5/5 reliable in-cluster: real codex completions, zero Cloudflare challenges. OAuth tokens were valid the whole time — this is a LiteLLM endpoint-routing bug, not an auth/IP/OpenAI block. Ref: BerriAI/litellm#27175 (workaround), openclaw#68033 (same issue, fixed there). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Dev agents (theo/nova/pixel/ops/aria + Cody) have been silently running on OpenRouter Nemotron instead of codex for days. Root cause is a LiteLLM endpoint-routing bug — not an OpenAI block, not auth, not the IP.
model: chatgpt/gpt-5.4*, LiteLLM hits/backend-api/codex/chat/completions→ Cloudflare returns a JS bot-challenge page (HTML, not JSON) → call fails → router silently falls back to Nemotron (no error logged, so it hid)./responsesendpoint is not challenged. Prefixing the model withresponses/forces it.Change
All 8
chatgpt/model entries:chatgpt/gpt-5.4*→chatgpt/responses/gpt-5.4*.Verification (in-cluster, before the change)
chatgpt/responses/gpt-5.4-mini→ 5/5 real completions, 0 Cloudflare challenges;gpt-5.4also works.chatgpt/gpt-5.4-mini(old) → Cloudflare challenge every time.Why this is the right fix
Post-deploy check
litellmpod picks up the new configmap (may needkubectl rollout restart deploy/litellmif no config checksum annotation)openai-codex/gpt-5.4-minireturnsreturned_model: gpt-5.4-mini(not nemotron)🤖 Generated with Claude Code