diff --git a/packages/core/src/core/client.test.ts b/packages/core/src/core/client.test.ts index f66f4d5e9f..eda9685081 100644 --- a/packages/core/src/core/client.test.ts +++ b/packages/core/src/core/client.test.ts @@ -137,6 +137,7 @@ async function fromAsync(promise: AsyncGenerator): Promise { describe('isThinkingSupported', () => { it('should return true for gemini-2.5', () => { expect(isThinkingSupported('gemini-2.5')).toBe(true); + expect(isThinkingSupported('gemini-2.5-flash')).toBe(true); }); it('should return true for gemini-2.5-pro', () => { @@ -147,9 +148,13 @@ describe('isThinkingSupported', () => { expect(isThinkingSupported('gemini-3-pro')).toBe(true); }); - it('should return false for other models', () => { - expect(isThinkingSupported('gemini-1.5-flash')).toBe(false); - expect(isThinkingSupported('some-other-model')).toBe(false); + it('should return false for gemini-2.0 models', () => { + expect(isThinkingSupported('gemini-2.0-flash')).toBe(false); + expect(isThinkingSupported('gemini-2.0-pro')).toBe(false); + }); + + it('should return true for other models', () => { + expect(isThinkingSupported('some-other-model')).toBe(true); }); }); diff --git a/packages/core/src/core/client.ts b/packages/core/src/core/client.ts index a563bc4111..a31f4baac9 100644 --- a/packages/core/src/core/client.ts +++ b/packages/core/src/core/client.ts @@ -33,7 +33,6 @@ import type { import type { ContentGenerator } from './contentGenerator.js'; import { DEFAULT_GEMINI_FLASH_MODEL, - DEFAULT_GEMINI_MODEL_AUTO, DEFAULT_THINKING_MODE, getEffectiveModel, } from '../config/models.js'; @@ -56,11 +55,7 @@ import { debugLogger } from '../utils/debugLogger.js'; import type { ModelConfigKey } from '../services/modelConfigService.js'; export function isThinkingSupported(model: string) { - return ( - model.startsWith('gemini-2.5') || - model.startsWith('gemini-3') || - model === DEFAULT_GEMINI_MODEL_AUTO - ); + return !model.startsWith('gemini-2.0'); } const MAX_TURNS = 100;