Honor provider config and support GPT-5.6 models - #3
Merged
Conversation
RyanKung
marked this pull request as ready for review
August 13, 2026 20:35
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
servehonor the persistedconfig.providerbefore falling back to all saved providers.--provideras the highest-priority selection.gpt-5.6-sol,gpt-5.6-terra, andgpt-5.6-lunato the Codex model registry and highlight ordering.1.5.7and update README examples to usegpt-5.6-sol.minimalreasoning effort tolowfor GPT-5.6 Codex requests.question_marklint.Root Cause
resolve_served_providersonly considered the persisted runtime provider when no credentials were saved. Once multiple provider credentials existed,servebuilt upstreams for every saved provider, so stale unrelated credentials such as Cursor could still be loaded/refreshed even when the user had configured a specific provider.For GPT-5.6, OpenAI API documentation lists the
gpt-5.6alias, but the Codex/ChatGPT OAuth backend currently rejects that alias for this account while accepting the concretegpt-5.6-*model IDs. The built-in list therefore exposes only the concrete IDs verified against the Codex backend.CI also caught a latest-stable clippy warning in existing Cursor code: the final optional built-in fetch branch can use the
?operator instead of anelse { return None; }tail.Impact
A configured provider now scopes the served upstreams and token status refresh tasks, avoiding background refresh attempts for unrelated stale providers. Codex users can select the GPT-5.6 Sol, Terra, and Luna model IDs directly through
/v1/models,rotom models, and Anthropic/OpenAI-compatible clients. The default Anthropic fallback remainsgpt-5.5.Fixes #2.
Validation
cargo fmt --allcargo clippy --all-targets --locked -- -D warningscargo test --all-targets --lockedcargo run -- --version->rotom 1.5.7cargo run -- models --provider openaicargo run -- status --provider openaiOKforgpt-5.6-sol,gpt-5.6-terra, andgpt-5.6-lunagpt-5.6alias is rejected by the Codex OAuth backend and is not exposed in the built-in model list49cea9c