revert the change that was recently added from a fix (#16390)

This commit is contained in:
Sehoon Shon
2026-01-12 12:23:06 -05:00
committed by GitHub
parent ed7bcf9968
commit 8656ce8a27
2 changed files with 3 additions and 7 deletions

View File

@@ -951,8 +951,7 @@ export class Config {
}
activateFallbackMode(model: string): void {
this.setActiveModel(model);
coreEvents.emitModelChanged(model);
this.setModel(model, true);
const authType = this.getContentGeneratorConfig()?.authType;
if (authType) {
logFlashFallback(this, new FlashFallbackEvent(authType));

View File

@@ -65,12 +65,9 @@ describe('Flash Model Fallback Configuration', () => {
});
describe('activateFallbackMode', () => {
it('should set active model to fallback and log event', () => {
it('should set model to fallback and log event', () => {
config.activateFallbackMode(DEFAULT_GEMINI_FLASH_MODEL);
expect(config.getActiveModel()).toBe(DEFAULT_GEMINI_FLASH_MODEL);
// Ensure the persisted model setting is NOT changed (to preserve AUTO behavior)
expect(config.getModel()).toBe(DEFAULT_GEMINI_MODEL);
expect(config.getModel()).toBe(DEFAULT_GEMINI_FLASH_MODEL);
expect(logFlashFallback).toHaveBeenCalledWith(
config,
expect.any(FlashFallbackEvent),