Skip to content

Gemini 4 takes thinkingLevel, not thinkingBudget - #32

Open
fredheir wants to merge 1 commit into
lm15-dev:mainfrom
fredheir:gemini-4-thinking-level
Open

fredheir wants to merge 1 commit into
lm15-dev:mainfrom
fredheir:gemini-4-thinking-level

Conversation

@fredheir

Copy link
Copy Markdown
Contributor

gemini_level_class() only matches gemini-3*, so Reasoning(effort=...) on a Gemini 4 model is sent as thinkingBudget. Vertex rejects that:

400 Thinking budget is not supported for this model. Use thinking level instead.

This adds gemini-4 to the model table (MAP-7 rule 10). Checked live on Vertex with gemini-4-neon: thinkingLevel low, medium and high are accepted. Two assertions added to tests/test_reasoning_mapping.py.

Thanks for lm15!

gemini_level_class() matched only gemini-3, so Gemini 4 got thinkingBudget,
which Vertex rejects with a 400. Add gemini-4 to the table.

This branch has not been deployed

No deployments
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