- Notifications
You must be signed in to change notification settings - Fork1k
Closed
Labels
Description
Initial Checks
- I confirm that I'm using the latest version of Pydantic AI
- I confirm that I searched for my issue inhttps://github.com/pydantic/pydantic-ai/issues before opening this issue
Description
self explanatory. might be a google error though
Example Code
frompydantic_ai.models.geminiimportGeminiModelSettings,GeminiModel,ThinkingConfigfrompydantic_ai.providers.google_verteximportGoogleVertexProviderfrompydantic_ai.messagesimportModelRequestfrompydantic_ai.directimportmodel_requestmodel=GeminiModel("gemini-2.5-pro-preview-05-06",provider=GoogleVertexProvider(project_id="******"))awaitmodel_request(model,messages=[ModelRequest.user_text_prompt("hey")],model_settings=GeminiModelSettings(gemini_thinking_config=ThinkingConfig(include_thoughts=True,thinking_budget=1000)))# {'thinking_config': {'include_thoughts': True, 'thinking_budget': 1000}}# {'contents': [{'role': 'user', 'parts': [{'text': 'hey'}]}], 'generationConfig': {'thinking_config': {'include_thoughts': True, 'thinking_budget': 1000}}}ModelHTTPError:status_code:400,model_name:gemini-2.5-pro-preview-05-06,body: {"error": {"code":400,"message":"Unable to submit request because Thinking can't be disabled for this model. Remove 'thinking_config.thinking_budget' from your request and try again.. Learn more: https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/gemini","status":"INVALID_ARGUMENT" }}
Python, Pydantic AI & LLM client version
python==3.12pydantic==0.2.16