-
Couldn't load subscription status.
- Fork 2.4k
feat: show model ID in API configuration dropdown #7423
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
Conversation
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.
Thank you for your contribution! This is a well-implemented feature that enhances user visibility by displaying model IDs alongside profile names in the API configuration dropdown. The implementation is clean, properly tested, and follows the project's patterns. I've left some suggestions for minor improvements below.
| } | ||
|
|
||
| return modelId | ||
| } |
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.
Is this intentional to duplicate the model ID cleaning logic here? Consider moving the cleanModelId() helper to a shared utility location (perhaps in packages/types/src/provider-settings.ts near the existing getModelId() function) since this logic might be useful elsewhere in the codebase.
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.
It's not duplicated
| <> | ||
| <span className="text-vscode-descriptionForeground opacity-70 flex-shrink-0">·</span> | ||
| <span className="text-vscode-descriptionForeground opacity-70 truncate min-w-0"> | ||
| {config.modelId} |
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.
Nice implementation of the smart truncation! The visual hierarchy is clear with the opacity and separator. For future consideration: if this pattern of displaying model IDs with profile names is needed elsewhere, this could be extracted into a small reusable component like .
| { id: "config1", name: "Config 1", modelId: "claude-3-opus-20240229" }, | ||
| { id: "config2", name: "Config 2", modelId: "gpt-4" }, | ||
| { id: "config3", name: "Config 3", modelId: "claude-3-sonnet-20240229" }, | ||
| ], |
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.
Great test coverage! Consider adding one more test case specifically for profiles without model IDs to ensure the component handles undefined modelId gracefully (though the code already handles this well with optional chaining).
|
LGTM! |
- Display model ID next to profile name in dropdown list items - Clean model IDs by removing prefix before '/' or '.' - Profile names never truncate, only model IDs using Tailwind CSS - Add visual hierarchy with reduced opacity for model IDs - Update backend to include model ID in listApiConfigMeta - Add comprehensive test coverage for new functionality
2843250 to
6f74696
Compare
| if (modelId.includes("/")) { | ||
| return modelId.split("/").pop() | ||
| } | ||
| // Check for "." and take the part after it |
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.
Do any model names include periods? Like Opus 4.1? Or are they all dashes?
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.
I think I see ones like gpt-3.5-turbo in the examples below
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.
Oh it should be just the first period but the Bedrock separates the provider and model with a dot
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.
- Updated cleanModelId() to only remove prefix before '/' (not '.') - Implemented left-side truncation with ellipsis for model IDs in UI - Model IDs now show as many characters as possible from the right side - Uses RTL text direction to achieve left-side ellipsis effect

Summary
This PR enhances the API configuration dropdown to display the model ID alongside each profile name, providing users with better visibility into which AI model is configured for each profile.
Changes
Frontend
flex-shrink-0), only model IDs truncate when space is limited (using Tailwind'struncateclass)Backend
listConfig()method to include model ID in the metadatacleanModelId()helper that removes prefixes before "/" or "." charactersTypes
ProviderSettingsEntrytype to include optionalmodelIdfieldTests
Screenshots
[Add screenshots here showing the dropdown with model IDs displayed]
Testing
Implementation Notes
Important
Enhances API configuration dropdown to display model IDs alongside profile names, with updates to
ApiConfigSelectorandProviderSettingsManager, and all tests passing.ApiConfigSelector: Displays model IDs next to profile names in dropdown.truncateclass.ProviderSettingsManager:listConfig()now includes model ID in metadata.cleanModelId()to remove prefixes before "/" or ".".ProviderSettingsEntrytype now includes optionalmodelIdfield.This description was created by
for 6593853. You can customize this summary. It will automatically update as commits are pushed.