Skip to content

Commit bee0118

Browse files
committed
fix: to support backward compatibility for vs and eclipse, adding back modelSelection in chat-client
1 parent 7c22e8d commit bee0118

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

chat-client/src/client/texts/modelSelection.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,33 @@
11
import { ChatItem, ChatItemFormItem, ChatItemType } from '@aws/mynah-ui'
22

3+
/**
4+
* @deprecated use aws/chat/listAvailableModels server request instead
5+
*/
6+
export enum BedrockModel {
7+
CLAUDE_SONNET_4_20250514_V1_0 = 'CLAUDE_SONNET_4_20250514_V1_0',
8+
CLAUDE_3_7_SONNET_20250219_V1_0 = 'CLAUDE_3_7_SONNET_20250219_V1_0',
9+
}
10+
11+
type ModelDetails = {
12+
label: string
13+
}
14+
15+
const modelRecord: Record<BedrockModel, ModelDetails> = {
16+
[BedrockModel.CLAUDE_3_7_SONNET_20250219_V1_0]: { label: 'claude-3.7-sonnet' },
17+
[BedrockModel.CLAUDE_SONNET_4_20250514_V1_0]: { label: 'claude-4-sonnet' },
18+
}
19+
20+
const modelOptions = Object.entries(modelRecord).map(([value, { label }]) => ({
21+
value,
22+
label,
23+
}))
24+
325
export const modelSelection: ChatItemFormItem = {
426
type: 'select',
527
id: 'model-selection',
628
mandatory: true,
729
hideMandatoryIcon: true,
30+
options: modelOptions,
831
border: false,
932
autoWidth: true,
1033
}

0 commit comments

Comments
 (0)