fix: Codex OAuth end-to-end + reasoning effort (v2.1.2)#205
Merged
Conversation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Uncomment openai-codex provider in config.yaml (model: gpt-5.4) - Add openai-codex-mini/spark/high variant providers - Add oauth backend to _SUPPORTED_BACKENDS in config.py - Add oauth default transport profile in lane_registry.py - Update _PROVIDER_LANE_BINDINGS: openai-codex canonical → gpt-5.4, add mini/spark/high bindings - Add all 20 Codex models to _CANONICAL_MODEL_LANES - Update registry.py example_model to openai-codex/gpt-5.4 - Add model_requested routing rules for codex/gpt-5.4/codex-mini/codex-high Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The Codex base_url (chatgpt.com/backend-api/codex/responses) IS the full endpoint. The openai-compat wrapper was appending /chat/completions, causing all requests to 404 → triggering degrade_to fallback → Sonnet. - Add per-provider transport bindings for openai-codex* with chat_path: "" - Remove paid providers (gpt-4o, sonnet) from openai-codex degrade_to chain Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
OAuthBackend._run_helper() parses stdout as JSON to populate TokenStore. The helper was printing human-readable text to stdout → json.JSONDecodeError → every Codex request failed before even reaching the API. Status/info messages already went to stderr; now stdout is only the JSON token. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- openai-codex-xhigh → gpt-5.3-codex-xhigh (Extra hoch) - openai-codex-low → gpt-5.3-codex-low (Niedrig) - Routing rules + lane bindings + transport bindings for both - Remove anthropic/sonnet-4.6 from openai-codex-high degrade_to Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…roviders providers.py: load extra_body from provider config as default_extra_body, injected into every request before caller's extra_body override. New providers for GPT-5.4 reasoning control: openai-codex-5.4-xhigh → reasoning_effort=extra_high openai-codex-5.4-high → reasoning_effort=high openai-codex-5.4-medium → reasoning_effort=medium openai-codex-5.4-low → reasoning_effort=low All share model=gpt-5.4 with chat_path="" transport binding. Routing rules + transport bindings + OpenCode model entries included. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
| print("Token stored in credentials file.") | ||
| # Output token data as JSON to stdout so OAuthBackend._run_helper() can parse it. | ||
| # All human-readable status messages go to stderr (see above). | ||
| print(json.dumps(token_data)) |
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
chat_pathbug: Codex endpoint IS the full URL;openai-compatwas appending/chat/completions→ all requests 404'd → Sonnet fallbackfaigate-authJSON output:OAuthBackendexpects JSON on stdout; CLI printed human-readable text →json.JSONDecodeErroron every requestmax_tokens: Codex max is 8192; OpenCode limit was 32768 →invalid_request_errordegrade_tochainsoauthbackend validation: Added to_SUPPORTED_BACKENDSinconfig.pyCodex reasoning effort (GPT-5.4 + 5.3 series)
New
default_extra_bodymechanism inproviders.pyinjects provider-configured fields into every request. GPT-5.4 reasoning providers:reasoning_effortopenai-codex-5.4-xhighextra_highopenai-codex-5.4-highhighopenai-codex-5.4-mediummediumopenai-codex-5.4-lowlowGPT-5.3 reasoning via model name:
openai-codex-xhigh,openai-codex-high,openai-codex-spark,openai-codex-low,openai-codex-mini.All 20 Codex model variants added to
_CANONICAL_MODEL_LANES.Test plan
faigate-auth openai-codex 2>/dev/null | python -c "import json,sys; d=json.load(sys.stdin); print(d['access_token'][:10])"→ prints token prefixreasoning_effort=extra_highin bodyfaigate --version→ 2.1.2 after brew upgrade🤖 Generated with Claude Code