log fallback mode (#15817)

This commit is contained in:
Sehoon Shon
2026-01-02 13:19:43 -05:00
committed by GitHub
parent 8a0190ca3b
commit 788bb04f5c
3 changed files with 31 additions and 4 deletions
+13 -2
View File
@@ -60,8 +60,11 @@ import { ideContextStore } from '../ide/ideContext.js';
import { WriteTodosTool } from '../tools/write-todos.js';
import type { FileSystemService } from '../services/fileSystemService.js';
import { StandardFileSystemService } from '../services/fileSystemService.js';
import { logRipgrepFallback } from '../telemetry/loggers.js';
import { RipgrepFallbackEvent } from '../telemetry/types.js';
import { logRipgrepFallback, logFlashFallback } from '../telemetry/loggers.js';
import {
RipgrepFallbackEvent,
FlashFallbackEvent,
} from '../telemetry/types.js';
import type { FallbackModelHandler } from '../fallback/types.js';
import { ModelAvailabilityService } from '../availability/modelAvailabilityService.js';
import { ModelRouterService } from '../routing/modelRouterService.js';
@@ -911,6 +914,14 @@ export class Config {
this.modelAvailabilityService.reset();
}
activateFallbackMode(model: string): void {
this.setModel(model, true);
const authType = this.getContentGeneratorConfig()?.authType;
if (authType) {
logFlashFallback(this, new FlashFallbackEvent(authType));
}
}
getActiveModel(): string {
return this._activeModel ?? this.model;
}