Assistant: Use user selected model (#9227) #9231
Merged
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.
Description from @georgestagg's original PR below 👇
Addresses #9226.
I think this broke when the Code OSS language model proposed API changed to introduce
prepareLanguageModelChat()
.These changes essentially defer selection of the model ID until the very last second in e.g.
provideLanguageModelChatResponse()
and other methods, rather than trying to store a specific model ID on a class property such asthis._config
orthis.model
, since a single language model provider instance can now handle multiple model IDs.QA
Open Positron
Open Assistant, select a non-default model for your provider, e.g. Claude 4 Opus.
Send a request, watching the Assistant log output pane.
Ensure that the right model is selected by watching the model ID reported in the logs.
Repeat for the Anthropic and the AWS Bedrock providers, to cover both the Anthropic SDK and Vercel AI SDK code paths.
We should probably also check the
maxOutputTokens
config setting still works, since I've had to tweak that code.