fix: prevent stale base_url after provider switch - #47533
Open
timrichardson wants to merge 4 commits into
Open
Conversation
1 task
19 tasks
Contributor
|
Thanks for tracing the stale-endpoint path. The runtime premise remains valid on current main: Problems
Suggested changes
Automated hermes-sweeper review. |
…d-stale-base-url # Conflicts: # cli.py # gateway/slash_commands.py # scripts/release.py
Author
|
Updated against current main per the sweeper review: retained the existing gateway clear behavior, ported the runtime guard to both resolution branches, added a credential-pool Ollama Cloud regression, and added real CLI config-persistence coverage. Targeted suite: 169 passed via scripts/run_tests.sh. |
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.
Fixes #47521
Summary
model.base_urlfrom a previous built-in provider from hijacking a newly selected built-in provider runtime.ollama-cloud+deepseek-v4-procase wheremodel.base_urlremainedhttps://chatgpt.com/backend-api/codexafter switching away from Codex.model.default/model.provider, so stale endpoints are not left behind for the next process.Reproduction on current main
Without the fix, runtime resolution accepts the stale Codex URL solely because the persisted provider now matches Ollama Cloud. The regression exercises both the normal API-key path and a real credential-pool selection path.
Implementation notes
_provider_supports_config_base_url_override()to reject config base URLs that point at another known provider's stock endpoint.Tests