fix(core): prevent utility calls from changing session active model (#20035)

This commit is contained in:
Adam Weidman
2026-02-23 16:54:02 -05:00
committed by GitHub
parent 3e5e608a22
commit 767d80e768
6 changed files with 128 additions and 42 deletions
@@ -47,7 +47,10 @@ describe('Fallback Integration', () => {
const requestedModel = PREVIEW_GEMINI_MODEL;
// 3. Apply model selection
const result = applyModelSelection(config, { model: requestedModel });
const result = applyModelSelection(config, {
model: requestedModel,
isChatModel: true,
});
// 4. Expect fallback to Flash
expect(result.model).toBe(PREVIEW_GEMINI_FLASH_MODEL);