Conversation
1 task
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
Fixes #1681.
Record the provider-reported model through the existing
response.set_resolved_model()API when it is a nonempty string different from the configured model ID. This uses the response already received; it does not make another API request or change model selection.The shared helper covers Chat, AsyncChat, Responses, AsyncResponses and legacy Completion, including streaming responses and the Responses
chat_completionsoverride. Custommodel_nameconfigurations retain the public configured ID while recording the served provider ID. Missing, empty and unchanged model values preserve the existing null provenance field.Tests use the real OpenAI SDK with mock HTTP transports, verify exactly one request and unchanged request model, and check persisted
turns.resolved_modelplus async-to-sync conversion.Validation
test_extract_fenced_code_crlf, also fails in a clean worktree at upstream1df47ddcac20d58726a993949da8ef84f4081085, using the same environment and verified baseline module path. It concerns pre-existing Windows CRLF output, not these model changes. No snapshot, newline behavior or unrelated test was changed.git diff --check: pass.Draft for review. The other supported OS/Python CI combinations and plugin-load shell check have not been exercised on this host.