Thinking config for 2.5 models
When using planner=BuiltInPlanner(thinking_config=types.ThinkingConfig(thinking_budget=1024)) with the new 2.5 models, now we got an error - 400 INVALID_ARGUMENT. {'error': {'code': 400, 'message': 'Unable to submit request because thinking is a default and constant feature of this model; To proceed, please remove the thinking_config.thinking_budget setting from your configuration and retry. Learn more: https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/gemini', 'status': 'INVALID_ARGUMENT'}}.
How should we set thinking config for an agent now? Thanks.
+1
+1
has anyone figured this one out yet? trying to use flash 2.5, but the default thinking adds unwanted latency ...
+1
The update adk version is working, but I’ve noticed from the logs that the thinking tokens exceed the budget I set.
+1
+1
+1
I'm seeing the thought tokens exceed the thinking budget too with adk 1.5.0 when using Gemini 2.5 Flash.
Input
...
"temperature": 0,
"response_mime_type": "application/json",
"thinking_config": {
"thinking_budget": 4096
}
},
"contents": [
{
"parts": [
{
"text": "Follow the system instructions"
}
],
"role": "user"
},
{
...
Output
...
"role": "model"
},
"usage_metadata": {
"candidates_token_count": 2786,
"prompt_token_count": 15203,
"prompt_tokens_details": [
{
"modality": "TEXT",
"token_count": 2045
},
{
"modality": "DOCUMENT",
"token_count": 13158
}
],
"thoughts_token_count": 7083,
"total_token_count": 25072
}
}
Note that thinking_budget is 4096, but thoughts_token_count is greater (7083).
Hi @Alexheqingli and thanks to everyone who participated in this thread.
We're currently doing some housekeeping on our issue tracker. Given the rapid pace of development and the number of updates since this was last active, there's a good chance this issue has been resolved in a newer version. To help us keep our backlog focused on current issues, we are closing this as stale.
If you're still facing this problem, could you please update to the very latest version of the library and confirm the issue still exists? If it does, please comment here, and we will be happy to reopen this issue and investigate further.
Thanks for your contribution and understanding!