Skip to content

Commit

Permalink
Chat: Assign ModelUIGroup for Enterprise model (#4607)
Browse files Browse the repository at this point in the history
  • Loading branch information
abeatrix authored and valerybugakov committed Jun 19, 2024
1 parent 910afd6 commit 14a9d19
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
2 changes: 2 additions & 0 deletions lib/shared/src/models/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,6 @@ export const ModelUIGroup: Record<string, string> = {
Balanced: 'Balanced (Speed & Accuracy)',
Speed: 'Optimized for Speed',
Ollama: 'Ollama (Local)',
// Used for identifying the model type but currently not used for displaying in the UI.
Enterprise: 'Enterprise',
}
5 changes: 4 additions & 1 deletion vscode/src/models/sync.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import {
Model,
ModelUIGroup,
ModelUsage,
ModelsService,
RestClient,
Expand Down Expand Up @@ -65,7 +66,9 @@ describe('syncModels', () => {
new Model(
authStatus.configOverwrites.chatModel,
[ModelUsage.Chat, ModelUsage.Edit],
getEnterpriseContextWindow(chatModel, authStatus.configOverwrites)
getEnterpriseContextWindow(chatModel, authStatus.configOverwrites),
undefined,
ModelUIGroup.Enterprise
),
])
})
Expand Down
5 changes: 4 additions & 1 deletion vscode/src/models/sync.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import {
type AuthStatus,
CHAT_INPUT_TOKEN_BUDGET,
Model,
ModelUIGroup,
ModelUsage,
ModelsService,
RestClient,
Expand Down Expand Up @@ -65,7 +66,9 @@ export async function syncModels(authStatus: AuthStatus): Promise<void> {
getEnterpriseContextWindow(
authStatus?.configOverwrites?.chatModel,
authStatus?.configOverwrites
)
),
undefined,
ModelUIGroup.Enterprise
),
])
} else {
Expand Down

0 comments on commit 14a9d19

Please sign in to comment.