Conversation
This was referenced Jul 7, 2026
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.
Why
Model discovery is a startup-critical request path, but it still constructed a default
reqwestclient directly. That meantfeatures.respect_system_proxycould apply to Responses API traffic while/modelscatalog refreshes bypassed the same resolved proxy policy.This is the next focused migration on top of #31342. It makes the proxy decision mandatory at the model-provider boundary rather than adding another optional flag a caller could omit.
What changed
HttpClientFactorywhen constructing aModelProvidermodels manager.Configthroughcodex-coreinto the OpenAI models endpoint./modelstransport with the route-aware API client and the full request destination.ReqwestDefaultpolicy.Review guide
model-provider/src/provider.rsadds the required factory to the provider API.model-provider/src/models_endpoint.rsis the behavior change that routes/modelsthrough the shared client policy.core/src/thread_manager.rssupplies the feature-derived factory; the remaining edits update test and alternate-provider construction.Validation
cargo check --tests -p codex-model-provider -p codex-core -p codex-memories-writejust test -p codex-model-provider(50 tests passed)Follow-up
Other direct
reqwestconsumers will be migrated in separate, reviewable stack entries.Stack created with Sapling. Best reviewed with ReviewStack.