-
Notifications
You must be signed in to change notification settings - Fork 2.8k
feat: standardize model selectors across all providers #10294
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
hannesrudolph
wants to merge
7
commits into
main
Choose a base branch
from
feat/standardize-model-selectors
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
Contributor
Re-review complete. No new issues found in changes since last review.
Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues. |
Collaborator
|
LGTM |
mrubens
reviewed
Jan 7, 2026
mrubens
reviewed
Jan 7, 2026
Collaborator
Author
Contributor
Verified the Z.ai default model fix is already properly implemented:
No additional changes required - the review issue is already resolved. |
967fa3f to
e0a24c8
Compare
e0a24c8 to
211fed7
Compare
Replace various model selection UI patterns with consistent ModelPicker component: - Replace Select dropdowns for static providers (Anthropic, Bedrock, etc.) - Replace text input + radio buttons for Ollama and LM Studio - Replace Select for VSCodeLM with transform functions for vendor/family object - Add providerModelConfig.ts with service configuration helpers - Add unit tests for new utility functions
Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>
…delConfig Move provider-specific Z.ai default model ID logic from ApiOptions.tsx template into getDefaultModelIdForProvider() utility function. This keeps the ApiOptions component provider-agnostic and centralizes the logic for handling China vs International entrypoints.
- Removed unused simplifySettings prop from LMStudioProps type - Removed corresponding prop from LMStudio call in ApiOptions.tsx - No functional change, just dead code cleanup
- Added handleModelChangeSideEffects() to providerModelConfig.ts - Centralizes provider-specific logic (Bedrock awsCustomArn clearing) - Also handles reasoningEffort reset on model change - Addresses mrubens review comment about provider-specific code in template
e02b9bd to
d56f44e
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Enhancement
New feature or request
PR - Needs Preliminary Review
size:XL
This PR changes 500-999 lines, ignoring generated files.
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.
Closes #10650
Summary
Replaces various model selection UI patterns with a consistent search-style ModelPicker component across all providers, giving users a unified experience.
Changes
New Files
webview-ui/src/components/settings/utils/providerModelConfig.ts- Helper utilities including:PROVIDER_SERVICE_CONFIG- Maps providers to service names/URLsgetDefaultModelIdForProvider(),getStaticModelsForProvider()shouldUseGenericModelPicker()- Determines which providers use generic ModelPickerhandleModelChangeSideEffects()- Centralizes provider-specific model change logicwebview-ui/src/components/settings/utils/__tests__/providerModelConfig.spec.ts- Unit testsModified Files
ModelPicker.tsx- Added new props:label,valueTransform,displayTransform,onModelChange; added new ModelIdKey types for Ollama, LMStudio, VSCodeLMApiOptions.tsx- Replaced Select-based generic picker with ModelPicker usingshouldUseGenericModelPicker()Ollama.tsx- Replaced VSCodeTextField + VSCodeRadioGroup with ModelPickerLMStudio.tsx- Replaced text + radio with ModelPicker; added second ModelPicker for draft modelVSCodeLM.tsx- Replaced Select with ModelPicker using transform functions for vendor/family objectApiOptions.provider-filtering.spec.tsx- Added Popover/Command component mocksImplementation Details
ModelPickerviashouldUseGenericModelPicker()valueTransform/displayTransformto handle{ vendor, family }object formatgetStaticModelsForProvider()errorMessagepropTest Results
All tests pass.