mirror of
https://github.com/Kilo-Org/kilocode.git
synced 2026-08-30 17:14:40 +08:00
fix(cli): skip thinkingLevel for Gemma models on Google provider
Gemma 4 models (gemma-4-31b-it, gemma-4-26b-a4b-it) don't support the thinkingLevel parameter. When models.dev metadata reports reasoning capability for these models, the variants function generates thinkingConfig with thinkingLevel entries that cause 400 INVALID_ARGUMENT errors from the Google AI Studio API. Add an early return for gemma model IDs before the thinkingLevel default branch, matching the pattern used by grok (line 728) and other non-reasoning models. Closes #12063
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@kilocode/cli": patch
|
||||
---
|
||||
|
||||
Fix Gemma 4 models failing with "thinkingLevel not supported" when using Google AI Studio.
|
||||
@@ -1014,6 +1014,7 @@ export function variants(model: Provider.Model): Record<string, Record<string, a
|
||||
// https://v5.ai-sdk.dev/providers/ai-sdk-providers/google-vertex
|
||||
case "@ai-sdk/google":
|
||||
// https://v5.ai-sdk.dev/providers/ai-sdk-providers/google-generative-ai
|
||||
if (id.includes("gemma")) return {} // kilocode_change
|
||||
if (id.includes("2.5")) {
|
||||
return {
|
||||
high: {
|
||||
|
||||
Reference in New Issue
Block a user