update isActiveModel to return false for unknown models

This commit is contained in:
Sehoon Shon
2026-02-19 15:32:30 -05:00
parent b3014337d5
commit 2ef872e73a
2 changed files with 4 additions and 4 deletions

View File

@@ -272,9 +272,9 @@ describe('isActiveModel', () => {
expect(isActiveModel(DEFAULT_GEMINI_FLASH_MODEL)).toBe(true);
});
it('should return true for unknown models and aliases (to support test models)', () => {
expect(isActiveModel('invalid-model')).toBe(true);
expect(isActiveModel(GEMINI_MODEL_ALIAS_AUTO)).toBe(true);
it('should return true for unknown models and aliases', () => {
expect(isActiveModel('invalid-model')).toBe(false);
expect(isActiveModel(GEMINI_MODEL_ALIAS_AUTO)).toBe(false);
});
it('should return false for PREVIEW_GEMINI_MODEL when useGemini3_1 is true', () => {

View File

@@ -208,7 +208,7 @@ export function isActiveModel(
useCustomToolModel: boolean = false,
): boolean {
if (!VALID_GEMINI_MODELS.has(model)) {
return true;
return false;
}
if (useGemini3_1) {
if (model === PREVIEW_GEMINI_MODEL) {