Skip to content

Conversation

@hannesrudolph
Copy link
Collaborator

@hannesrudolph hannesrudolph commented Dec 23, 2025

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/URLs
    • getDefaultModelIdForProvider(), getStaticModelsForProvider()
    • shouldUseGenericModelPicker() - Determines which providers use generic ModelPicker
    • handleModelChangeSideEffects() - Centralizes provider-specific model change logic
  • webview-ui/src/components/settings/utils/__tests__/providerModelConfig.spec.ts - Unit tests

Modified Files

  • ModelPicker.tsx - Added new props: label, valueTransform, displayTransform, onModelChange; added new ModelIdKey types for Ollama, LMStudio, VSCodeLM
  • ApiOptions.tsx - Replaced Select-based generic picker with ModelPicker using shouldUseGenericModelPicker()
  • Ollama.tsx - Replaced VSCodeTextField + VSCodeRadioGroup with ModelPicker
  • LMStudio.tsx - Replaced text + radio with ModelPicker; added second ModelPicker for draft model
  • VSCodeLM.tsx - Replaced Select with ModelPicker using transform functions for vendor/family object
  • ApiOptions.provider-filtering.spec.tsx - Added Popover/Command component mocks

Implementation Details

  • Static providers (Anthropic, Bedrock, Gemini, etc.) now use ModelPicker via shouldUseGenericModelPicker()
  • VSCodeLM uses valueTransform/displayTransform to handle { vendor, family } object format
  • Bedrock custom-arn option handled via getStaticModelsForProvider()
  • Error messages passed to ModelPicker via errorMessage prop

Test Results

All tests pass.

@dosubot dosubot bot added size:XL This PR changes 500-999 lines, ignoring generated files. Enhancement New feature or request labels Dec 23, 2025
@roomote
Copy link
Contributor

roomote bot commented Dec 23, 2025

Oroocle Clock   See task on Roo Cloud

Re-review complete. No new issues found in changes since last review.

  • Fix Z.ai default model in generic ModelPicker flow when zaiApiLine is set to China entrypoint (default link should match getProviderDefaultModelId).
Previous reviews

Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues.

@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Dec 23, 2025
@hannesrudolph hannesrudolph moved this from Triage to PR [Needs Prelim Review] in Roo Code Roadmap Dec 23, 2025
@hannesrudolph hannesrudolph moved this from PR [Needs Prelim Review] to PR [Needs Review] in Roo Code Roadmap Dec 23, 2025
@hannesrudolph hannesrudolph added PR - Needs Review and removed Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. labels Dec 23, 2025
@brunobergher
Copy link
Collaborator

LGTM

@hannesrudolph
Copy link
Collaborator Author

@roomote do what @mrubens said in their reviews and/or comments!

@roomote
Copy link
Contributor

roomote bot commented Jan 8, 2026

Fixaroo Clock   See task on Roo Cloud

Verified the Z.ai default model fix is already properly implemented:

  • mainlandZAiDefaultModelId is imported correctly (line 33)
  • Generic ModelPicker correctly uses conditional logic for zaiApiLine (lines 756-762)
  • PROVIDER_MODEL_CONFIG also handles the China/International entrypoint correctly (lines 340-346)
  • All 26 related tests pass

No additional changes required - the review issue is already resolved.

@hannesrudolph hannesrudolph force-pushed the feat/standardize-model-selectors branch from 967fa3f to e0a24c8 Compare January 10, 2026 02:08
hannesrudolph and others added 7 commits January 16, 2026 08:17
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
@hannesrudolph hannesrudolph force-pushed the feat/standardize-model-selectors branch from e02b9bd to d56f44e Compare January 16, 2026 15:19
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.

Projects

Status: PR [Needs Review]

Development

Successfully merging this pull request may close these issues.

[ENHANCEMENT] Standardize model selection UI across all providers

5 participants