-
Notifications
You must be signed in to change notification settings - Fork 2.7k
fix: allow custom model names in Model Combo Box for static providers #10230
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
base: main
Are you sure you want to change the base?
Conversation
Replace the generic Select component with ModelPicker for providers with static model lists (Anthropic, Mistral, Gemini, etc.). The ModelPicker component already supports entering custom model IDs that are not in the predefined list. This enables users to use newly released models from providers without waiting for Roo Code updates. Fixes #10229
Review complete. Found 1 issue to address.
Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues. |
| <ModelPicker | ||
| apiConfiguration={apiConfiguration} | ||
| setApiConfigurationField={(field, value, isUserAction) => { | ||
| setApiConfigurationField(field, value, isUserAction) | ||
|
|
||
| // Handle special cases when model changes | ||
| if (field === "apiModelId") { | ||
| // Clear custom ARN if not using custom ARN option for Bedrock | ||
| if (value !== "custom-arn" && selectedProvider === "bedrock") { | ||
| setApiConfigurationField("awsCustomArn", "") | ||
| } | ||
|
|
||
| // Clear reasoning effort when switching models to allow the new model's default to take effect | ||
| // This is especially important for GPT-5 models which default to "medium" | ||
| if (selectedProvider === "openai-native") { | ||
| setApiConfigurationField("reasoningEffort", undefined) | ||
| } | ||
| }}> | ||
| <SelectTrigger className="w-full"> | ||
| <SelectValue placeholder={t("settings:common.select")} /> | ||
| </SelectTrigger> | ||
| <SelectContent> | ||
| {selectedProviderModels.map((option) => ( | ||
| <SelectItem key={option.value} value={option.value}> | ||
| {option.label} | ||
| </SelectItem> | ||
| ))} | ||
| {selectedProvider === "bedrock" && ( | ||
| <SelectItem value="custom-arn">{t("settings:labels.useCustomArn")}</SelectItem> | ||
| )} | ||
| </SelectContent> | ||
| </Select> | ||
| </div> | ||
|
|
||
| {/* Show error if a deprecated model is selected */} | ||
| {selectedModelInfo?.deprecated && ( | ||
| <ApiErrorMessage errorMessage={t("settings:validation.modelDeprecated")} /> | ||
| )} | ||
| } | ||
| }} | ||
| defaultModelId={staticProviderDefaultModelId} | ||
| models={staticProviderModels} | ||
| modelIdKey="apiModelId" | ||
| serviceName={staticProviderLabel} | ||
| serviceUrl={docs?.url || ""} | ||
| organizationAllowList={organizationAllowList} | ||
| simplifySettings={fromWelcomeView} | ||
| hidePricing | ||
| /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Bedrock "Use Custom ARN" option is no longer discoverable after this change. Previously, Bedrock users saw an explicit SelectItem with the label t("settings:labels.useCustomArn") in the dropdown. Now they must know to type "custom-arn" manually in the search field. Consider adding "custom-arn" to the staticProviderModels for Bedrock (perhaps with a descriptive label) or extending the ModelPicker to support provider-specific extra options.
Fix it with Roo Code or mention @roomote and request a fix.
Related GitHub Issue
Closes: #10229
Description
This PR attempts to address Issue #10229 by replacing the generic
Selectcomponent with the existingModelPickercomponent for providers with static model lists (Anthropic, Mistral, Gemini, Bedrock, etc.).Key changes:
ModelPickercomponent already supports entering custom model IDs that are not in the predefined list (via the search field)Affected providers: Anthropic, Bedrock, Cerebras, DeepSeek, Doubao, Moonshot, Gemini, Mistral, OpenAI Native, Qwen Code, Vertex, xAI, Groq, SambaNova, Z.ai, Fireworks, Featherless, MiniMax, and Baseten.
Test Procedure
Pre-Submission Checklist
Documentation Updates
Additional Notes
Feedback and guidance are welcome!