-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Get the model id property for a given provider #8009
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! I've reviewed the changes and found that the refactoring improves type safety nicely. The const assertion on modelIdKeys and the new ModelIdKey type are good improvements. I have some suggestions for further improvements to reduce code duplication and enhance maintainability.
jr
left a comment
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.
Roomote's suggestion about webview-ui/src/utils/validate.ts seems interesting but also fine to do as a follow-up.
I DRY'd up |
Important
Enhanced model ID handling and validation for dynamic providers, updated UI components, and incremented package version.
modelIdKeysByProviderinprovider-settings.tsto map providers to their model ID keys.getModelId()inprovider-settings.tsto usemodelIdKeys.isTypicalProvider()andmodelIdKeysByProviderto handle typical providers.webviewMessageHandler.tsto handle model fetching for dynamic providers.validate.tsto usemodelIdKeysByProviderfor model ID validation.getModelValidationError()andvalidateApiConfiguration()to incorporate new validation logic.ApiOptions.tsxand provider-specific components to use new model ID logic.HuggingFace.tsx,LiteLLM.tsx, andUnbound.tsx.package.metadata.jsonfrom1.78.0to1.79.0.This description was created by
for 1293aa8. You can customize this summary. It will automatically update as commits are pushed.