-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Add provider ordering hint for chat model picker #4972
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
base: main
Are you sure you want to change the base?
Changes from 5 commits
05642dc
42d47f6
0589edb
b83d8c7
402380f
22c3ec5
9fef0f1
67e1e99
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -11,7 +11,7 @@ | |||||||
| import { IBlockedExtensionService } from '../../../platform/chat/common/blockedExtensionService'; | ||||||||
| import { ChatFetchResponseType, ChatLocation, getErrorDetailsFromChatFetchError } from '../../../platform/chat/common/commonTypes'; | ||||||||
| import { getTextPart } from '../../../platform/chat/common/globalStringUtils'; | ||||||||
| import { IConfigurationService } from '../../../platform/configuration/common/configurationService'; | ||||||||
| import { ConfigKey, IConfigurationService } from '../../../platform/configuration/common/configurationService'; | ||||||||
| import { EmbeddingType, getWellKnownEmbeddingTypeInfo, IEmbeddingsComputer } from '../../../platform/embeddings/common/embeddingsComputer'; | ||||||||
| import { IEndpointProvider } from '../../../platform/endpoint/common/endpointProvider'; | ||||||||
| import { CustomDataPartMimeTypes } from '../../../platform/endpoint/common/endpointTypes'; | ||||||||
|
|
@@ -159,6 +159,24 @@ | |||||||
| return undefined; | ||||||||
| } | ||||||||
|
|
||||||||
| /** | ||||||||
| * Returns a numeric priority for ordering in the model picker. | ||||||||
| * Lower values appear first. Top-level featuring remains controlled by | ||||||||
| * VS Code's models control manifest; this priority only affects ordering. | ||||||||
| */ | ||||||||
| function getVendorPriority(modelProvider: string): number { | ||||||||
| switch (modelProvider.toLowerCase()) { | ||||||||
| case 'openai': | ||||||||
| return 0; | ||||||||
| case 'anthropic': | ||||||||
| return 1; | ||||||||
| case 'google': | ||||||||
|
||||||||
| case 'google': | |
| case 'google': | |
| case 'gemini': |
Check failure on line 361 in src/extension/conversation/vscode-node/languageModelAccess.ts
GitHub Actions / Test (Linux)
Object literal may only specify known properties, and 'vendorPriority' does not exist in type 'LanguageModelChatInformation'.
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.
This new setting's
markdownDescriptionis hard-coded English text, while nearby Copilot settings use localized%...%keys (e.g.github.copilot.config.rateLimitAutoSwitchToAuto). To keep settings UI localizable, add a new entry topackage.nls.jsonand reference it here (e.g.%github.copilot.config.modelPickerVendorOrdering%).