Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion packages/core/src/config/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1031,7 +1031,8 @@ export class Config {
}

activateFallbackMode(model: string): void {
this.setModel(model, true);
this.setActiveModel(model);
coreEvents.emitModelChanged(model);
const authType = this.getContentGeneratorConfig()?.authType;
if (authType) {
logFlashFallback(this, new FlashFallbackEvent(authType));
Expand Down
5 changes: 3 additions & 2 deletions packages/core/src/config/flashFallback.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,10 @@ describe('Flash Model Fallback Configuration', () => {
});

describe('activateFallbackMode', () => {
it('should set model to fallback and log event', () => {
it('should set active model to fallback and log event', () => {
config.activateFallbackMode(DEFAULT_GEMINI_FLASH_MODEL);
expect(config.getModel()).toBe(DEFAULT_GEMINI_FLASH_MODEL);
expect(config.getActiveModel()).toBe(DEFAULT_GEMINI_FLASH_MODEL);
expect(config.getModel()).toBe(DEFAULT_GEMINI_MODEL);
expect(logFlashFallback).toHaveBeenCalledWith(
config,
expect.any(FlashFallbackEvent),
Expand Down