fix(small-model): omit thinkingConfig for non-reasoning Google models

This commit is contained in:
Zeying Tian
2026-08-09 03:10:31 -04:00
parent 493a618efc
commit 0bbbcd6445
3 changed files with 25 additions and 9 deletions
@@ -457,6 +457,22 @@ describe('callSmallModel — Google thinking configuration', () => {
const body = JSON.parse(lastCall(fetchMock).init.body);
expect(body.generationConfig.thinkingConfig).toEqual({ thinkingBudget: 0 });
});
it('omits thinkingConfig for other Google/Gemini models', async () => {
fetchMock.mockResolvedValue(googleResponse('generated commit'));
await callSmallModel({
auth: { google: { type: 'api', key: 'google-key' } },
catalog: {},
workingDirectory: '/proj',
providerID: 'google',
modelID: 'gemini-1.5-flash',
prompt: 'generate',
});
const body = JSON.parse(lastCall(fetchMock).init.body);
expect(body.generationConfig.thinkingConfig).toBeUndefined();
});
});
describe('callSmallModel — GitHub Copilot endpoint routing', () => {