Let reasoning gemini models dynamically set their thinking budget

All gemini 2.5 series models support dynamic thinking budgets by
setting thinking_budget to -1.
This commit is contained in:
Debanjum
2025-06-27 00:34:22 -07:00
parent ba059ad8b0
commit d37113850c

View File

@@ -195,7 +195,7 @@ async def gemini_chat_completion_with_backoff(
thinking_config = None
if deepthought and is_reasoning_model(model_name):
thinking_config = gtypes.ThinkingConfig(thinking_budget=MAX_REASONING_TOKENS_GEMINI, include_thoughts=True)
thinking_config = gtypes.ThinkingConfig(thinking_budget=-1, include_thoughts=True)
max_output_tokens = MAX_OUTPUT_TOKENS_FOR_STANDARD_GEMINI
if is_reasoning_model(model_name):