update isActiveModel to return false for unknown models

This commit is contained in:
Sehoon Shon
2026-02-19 15:32:30 -05:00
parent a2d831f1d7
commit 9ddc46c59a
3 changed files with 4 additions and 117 deletions

View File

@@ -318,9 +318,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

@@ -231,7 +231,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) {