Skip to content

fix(gemini): Only include thinkingLevel if thinkingBudget is unset#7

Open
subpop wants to merge 1 commit intoTom-Ryder:mainfrom
subpop:gemini-thinking-budget
Open

fix(gemini): Only include thinkingLevel if thinkingBudget is unset#7
subpop wants to merge 1 commit intoTom-Ryder:mainfrom
subpop:gemini-thinking-budget

Conversation

@subpop
Copy link
Copy Markdown
Contributor

@subpop subpop commented Mar 28, 2026

If a request contains both thinkingLevel and thinkingBudget, the Gemini API returns an HTTP 400. This fix degrades the thinking config to prefer a token budget, falling back to a thinking level value only if the budget is not provided. gemini-2.5-pro doesn't support thinkingLevel, only gemini-3-pro-preview, so the library should have some way to support both.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant