Skip to content

Commit 2ef872e

Browse files
committed
update isActiveModel to return false for unknown models
1 parent b301433 commit 2ef872e

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

packages/core/src/config/models.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -272,9 +272,9 @@ describe('isActiveModel', () => {
272272
expect(isActiveModel(DEFAULT_GEMINI_FLASH_MODEL)).toBe(true);
273273
});
274274

275-
it('should return true for unknown models and aliases (to support test models)', () => {
276-
expect(isActiveModel('invalid-model')).toBe(true);
277-
expect(isActiveModel(GEMINI_MODEL_ALIAS_AUTO)).toBe(true);
275+
it('should return true for unknown models and aliases', () => {
276+
expect(isActiveModel('invalid-model')).toBe(false);
277+
expect(isActiveModel(GEMINI_MODEL_ALIAS_AUTO)).toBe(false);
278278
});
279279

280280
it('should return false for PREVIEW_GEMINI_MODEL when useGemini3_1 is true', () => {

packages/core/src/config/models.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ export function isActiveModel(
208208
useCustomToolModel: boolean = false,
209209
): boolean {
210210
if (!VALID_GEMINI_MODELS.has(model)) {
211-
return true;
211+
return false;
212212
}
213213
if (useGemini3_1) {
214214
if (model === PREVIEW_GEMINI_MODEL) {

0 commit comments

Comments
 (0)