Merge pull request #2774 from IngTian/fix/omit-thinking-config-non-reasoning

fix(small-model): omit thinkingConfig for non-reasoning Google models
This commit is contained in:
Bohdan Triapitsyn
2026-08-27 23:14:53 +03:00
committed by GitHub
3 changed files with 25 additions and 9 deletions
@@ -536,6 +536,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', () => {