mirror of
https://github.com/microsoft/vscode.git
synced 2026-02-15 07:28:05 +00:00
Remove some legacy fallbacks (#294649)
This commit is contained in:
@@ -718,10 +718,7 @@ export class ChatThinkingContentPart extends ChatCollapsibleContentPart implemen
|
||||
const timeout = setTimeout(() => cts.cancel(), 5000);
|
||||
|
||||
try {
|
||||
let models = await this.languageModelsService.selectLanguageModels({ vendor: 'copilot', id: 'copilot-fast' });
|
||||
if (!models.length) {
|
||||
models = await this.languageModelsService.selectLanguageModels({ vendor: 'copilot', family: 'gpt-4o-mini' });
|
||||
}
|
||||
const models = await this.languageModelsService.selectLanguageModels({ vendor: 'copilot', id: 'copilot-fast' });
|
||||
if (!models.length) {
|
||||
this.setFallbackTitle();
|
||||
return;
|
||||
|
||||
@@ -665,7 +665,7 @@ export class ChatInputPart extends Disposable implements IHistoryNavigationWidge
|
||||
|
||||
private initSelectedModel() {
|
||||
const persistedSelection = this.storageService.get(this.getSelectedModelStorageKey(), StorageScope.APPLICATION);
|
||||
const persistedAsDefault = this.storageService.getBoolean(this.getSelectedModelIsDefaultStorageKey(), StorageScope.APPLICATION, persistedSelection === 'copilot/gpt-4.1');
|
||||
const persistedAsDefault = this.storageService.getBoolean(this.getSelectedModelIsDefaultStorageKey(), StorageScope.APPLICATION, true);
|
||||
|
||||
if (persistedSelection) {
|
||||
const model = this.getModels().find(m => m.identifier === persistedSelection);
|
||||
|
||||
@@ -877,13 +877,7 @@ export class OutputMonitor extends Disposable implements IOutputMonitor {
|
||||
}
|
||||
|
||||
private async _getLanguageModel(): Promise<string | undefined> {
|
||||
let models = await this._languageModelsService.selectLanguageModels({ vendor: 'copilot', id: 'copilot-fast' });
|
||||
|
||||
// Fallback to gpt-4o-mini if copilot-fast is not available for backwards compatibility
|
||||
if (!models.length) {
|
||||
models = await this._languageModelsService.selectLanguageModels({ vendor: 'copilot', family: 'gpt-4o-mini' });
|
||||
}
|
||||
|
||||
const models = await this._languageModelsService.selectLanguageModels({ vendor: 'copilot', id: 'copilot-fast' });
|
||||
return models.length ? models[0] : undefined;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user