Skip to content

Conversation

@hannesrudolph
Copy link
Collaborator

@hannesrudolph hannesrudolph commented Dec 23, 2025

Summary

Replaces various model selection UI patterns with a consistent search-style ModelPicker component across all providers, giving users a unified experience as outlined in plans/standardize-model-selector.md.

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
  • webview-ui/src/components/settings/utils/__tests__/providerModelConfig.spec.ts - 20 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's custom-arn option handled via getStaticModelsForProvider()
  • Error messages passed to ModelPicker via errorMessage prop

Test Results

All tests pass (356 test files, 4957 tests passed, 48 skipped).


Important

Standardizes model selection UI with a unified ModelPicker component across all providers, enhancing consistency and user experience.

  • Behavior:
    • Replaces various model selection UIs with a unified ModelPicker component across all providers.
    • Introduces shouldUseGenericModelPicker() to determine providers using the generic picker.
    • Handles custom-arn option for Bedrock in ApiOptions.tsx.
  • Components:
    • ModelPicker.tsx: Added props for label, value/display transform, and model change callback.
    • ApiOptions.tsx: Replaced Select-based pickers with ModelPicker for static providers.
    • Ollama.tsx, LMStudio.tsx, VSCodeLM.tsx: Replaced existing UI with ModelPicker.
  • Utilities:
    • providerModelConfig.ts: Added utilities for provider service config and model handling.
  • Tests:
    • Added providerModelConfig.spec.ts with 20 unit tests for new utilities.
    • Updated ApiOptions.provider-filtering.spec.tsx to mock new components and utilities.

This description was created by Ellipsis for 9a5e70b. You can customize this summary. It will automatically update as commits are pushed.

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
@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 outstanding issues.

  • 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
Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>
@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
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 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.

2 participants