-
Notifications
You must be signed in to change notification settings - Fork 83
feat: add model description to dropdown #2374
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,26 +5,28 @@ import { ListAvailableModelsResult } from '@aws/language-server-runtimes/protoco | |
| */ | ||
| export enum BedrockModel { | ||
| CLAUDE_SONNET_4_20250514_V1_0 = 'CLAUDE_SONNET_4_20250514_V1_0', | ||
| CLAUDE_3_7_SONNET_20250219_V1_0 = 'CLAUDE_3_7_SONNET_20250219_V1_0', | ||
| } | ||
|
|
||
| type ModelDetails = { | ||
| label: string | ||
| description: string | ||
| } | ||
|
|
||
| export const FALLBACK_MODEL_RECORD: Record<BedrockModel, ModelDetails> = { | ||
| [BedrockModel.CLAUDE_3_7_SONNET_20250219_V1_0]: { label: 'Claude 3.7 Sonnet' }, | ||
| [BedrockModel.CLAUDE_SONNET_4_20250514_V1_0]: { label: 'Claude Sonnet 4' }, | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. callout for future: probably worth adding a comment: since we are also removing 3.7, we have to be careful not to remove sonnet 4 because if for some reason call to the backend fails, there will be no fallback left to show in the UI |
||
| [BedrockModel.CLAUDE_SONNET_4_20250514_V1_0]: { | ||
| label: 'Claude Sonnet 4', | ||
| description: 'Hybrid reasoning and coding for regular use', | ||
| }, | ||
| } | ||
|
|
||
| export const BEDROCK_MODEL_TO_MODEL_ID: Record<BedrockModel, string> = { | ||
| [BedrockModel.CLAUDE_3_7_SONNET_20250219_V1_0]: 'claude-3.7-sonnet', | ||
| [BedrockModel.CLAUDE_SONNET_4_20250514_V1_0]: 'claude-sonnet-4', | ||
| } | ||
|
|
||
| export const FALLBACK_MODEL_OPTIONS: ListAvailableModelsResult['models'] = Object.entries(FALLBACK_MODEL_RECORD).map( | ||
| ([value, { label }]) => ({ | ||
| ([value, { label, description }]) => ({ | ||
| id: value, | ||
| name: label, | ||
| description: description, | ||
| }) | ||
| ) | ||
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.
can this change on the backend?
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.
Most probably it wont change but this is valid until for initial listAvailableModel API call so it should be fine.