Gemini API: temperature, top_p, and top_k Deprecated; Built-in Tools Now Combinable with Function Calling
What's new
- Deprecated:
temperature,top_p, andtop_kparameters deprecated for latest Gemini models - Google sampling defaults: Gemini API moves to internal defaults managed by Google
- Built-in + function calling: Gemini API now allows combining built-in tools (Google Search, code execution) with custom function calling tools in a single API request
- Backward compatibility: calls with these parameters may be ignored or cause deprecation warnings
Why it matters
Breaking change for developers relying on temperature=0 for deterministic outputs. All Gemini API integrations need auditing. The built-in + custom tool combination opens new possibilities for agentic pipelines.
How to try it
Check your code for calls using temperature, top_p, or top_k. Migration guidance at Gemini API Changelog: https://ai.google.dev/gemini-api/docs/changelog
Open original source
Google