We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Getting this error with Gemini but not with GPT
from pydantic_ai import Agent, ImageUrl agent = Agent(model="google-gla:gemini-2.0-flash-exp") result = await agent.run(["What company is this logo from?", ImageUrl(url="https://goo.gle/instrument-img")]) """ UnexpectedModelBehavior: Unexpected response from gemini 400, body: { "error": { "code": 400, "message": "Invalid JSON payload received. Unknown name \"data\" at 'contents[0].parts[1]': Cannot find field.\nInvalid JSON payload received. Unknown name \"mimeType\" at 'contents[0].parts[1]': Cannot find field.", "status": "INVALID_ARGUMENT", "details": [ { "@type": "type.googleapis.com/google.rpc.BadRequest", "fieldViolations": [ { "field": "contents[0].parts[1]", "description": "Invalid JSON payload received. Unknown name \"data\" at 'contents[0].parts[1]': Cannot find field." }, { "field": "contents[0].parts[1]", "description": "Invalid JSON payload received. Unknown name \"mimeType\" at 'contents[0].parts[1]': Cannot find field." } ] } ] } } """
Python 3.12.7 Pydantic AI 0.0.26
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Initial Checks
Description
Getting this error with Gemini but not with GPT
Example Code
Python, Pydantic AI & LLM client version
The text was updated successfully, but these errors were encountered: