You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I confirm that I'm using the latest version of Pydantic AI
Description
I get the below error when trying to run simple agent with Gemini provider:
lib/python3.11/site-packages/pydantic/type_adapter.py", line 468, in validate_json
return self.validator.validate_json(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
pydantic_core._pydantic_core.ValidationError: 4 validation errors for _GeminiResponse
candidates.0.avgLogProbs
Field required [type=missing, input_value={'content': {'parts': [{'...': -0.05566399544477463}, input_type=dict]
For further information visit https://errors.pydantic.dev/2.11/v/missing
candidates.0.index
Field required [type=missing, input_value={'content': {'parts': [{'...': -0.05566399544477463}, input_type=dict]
For further information visit https://errors.pydantic.dev/2.11/v/missing
candidates.0.safetyRatings
Field required [type=missing, input_value={'content': {'parts': [{'...': -0.05566399544477463}, input_type=dict]
For further information visit https://errors.pydantic.dev/2.11/v/missing
promptFeedback
Field required [type=missing, input_value={'candidates': [{'content...on': 'gemini-2.0-flash'}, input_type=dict]
For further information visit https://errors.pydantic.dev/2.11/v/missing
Example Code
frompydantic_aiimportAgentagent=Agent(model="google-gla:gemini-2.0-flash")
result=agent.run_sync("Hello, how are you?")
print(result.data)
Initial Checks
Description
I get the below error when trying to run simple agent with Gemini provider:
Example Code
Python, Pydantic AI & LLM client version
The text was updated successfully, but these errors were encountered: