diff options
| author | Abhi <[email protected]> | 2025-07-28 15:55:50 -0400 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-07-28 19:55:50 +0000 |
| commit | b08679c9066c9e26bd7a26ba9530bbef077cc883 (patch) | |
| tree | 0727d7ee49db0f6448057cb973bf810dc370bf0b /packages/core/src/config/config.ts | |
| parent | b6c2c64f9b7e1ac034a35ccf3f5e0d7845fcdd77 (diff) | |
Add new fallback state as prefactor for routing (#5065)
Diffstat (limited to 'packages/core/src/config/config.ts')
| -rw-r--r-- | packages/core/src/config/config.ts | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/packages/core/src/config/config.ts b/packages/core/src/config/config.ts index 7ccfdbc8..ee9067c6 100644 --- a/packages/core/src/config/config.ts +++ b/packages/core/src/config/config.ts @@ -226,7 +226,7 @@ export class Config { private readonly noBrowser: boolean; private readonly ideMode: boolean; private readonly ideClient: IdeClient | undefined; - private modelSwitchedDuringSession: boolean = false; + private inFallbackMode = false; private readonly maxSessionTurns: number; private readonly listExtensions: boolean; private readonly _extensions: GeminiCLIExtension[]; @@ -330,7 +330,7 @@ export class Config { await this.geminiClient.initialize(this.contentGeneratorConfig); // Reset the session flag since we're explicitly changing auth and using default model - this.modelSwitchedDuringSession = false; + this.inFallbackMode = false; } getSessionId(): string { @@ -348,19 +348,15 @@ export class Config { setModel(newModel: string): void { if (this.contentGeneratorConfig) { this.contentGeneratorConfig.model = newModel; - this.modelSwitchedDuringSession = true; } } - isModelSwitchedDuringSession(): boolean { - return this.modelSwitchedDuringSession; + isInFallbackMode(): boolean { + return this.inFallbackMode; } - resetModelToDefault(): void { - if (this.contentGeneratorConfig) { - this.contentGeneratorConfig.model = this.model; // Reset to the original default model - this.modelSwitchedDuringSession = false; - } + setFallbackMode(active: boolean): void { + this.inFallbackMode = active; } setFlashFallbackHandler(handler: FlashFallbackHandler): void { |
