Adk 1.2.1 browser files causing issue when working with images and gemini-2.0-flash model. Seeing the error 'display_name parameter is not supported in Gemini API.'
- Dominant language
- TypeScript
- Stars
- 1k
- Forks
- 267
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 9
Description
Describe the bug
I am trying to use the Gemini Model and analyze the images, I see an error saying "display_name parameter is not supported in Gemini API."
To Reproduce
Steps to reproduce the behavior:
Install google-adk 1.2.1
Design a simple Adk Application
Run adk web
Open Apps displayed, I select my agent and it answers text based prompts and when I attach images I get an error.
Error: " File \Python312\Lib\site-packages\google\genai\models.py", line 139, in _Content_to_mldev
_Part_to_mldev(api_client, item, to_object)
File "\Python312\Lib\site-packages\google\genai\models.py", line 94, in _Part_to_mldev
_Blob_to_mldev(
File "\Python312\Lib\site-packages\google\genai\models.py", line 61, in _Blob_to_mldev
raise ValueError('display_name parameter is not supported in Gemini API.')
ValueError: display_name parameter is not supported in Gemini API.
It was not an issue with earlier version of Google Adk 1.1.1. One difference I observed is with earlier version "google\adk\cli\browser" files, I dont see the displayName attribute as part of the inlineData request when files are uploaded, where as with Google Adk 1.2.1 "google\adk\cli\browser" files, we see the displayName attribute being as part of the inlineData which is causing this issue [display_name parameter is not supported in Gemini API.]
Google Adk 1.1.1 [google\adk\cli\browser files]
{
"appName": "Agent01",
"userId": "user",
"sessionId": "a5263545-3987-4064-ba38-9550e42287a5",
"newMessage": {
"role": "user",
"parts": [
{
"text": "analyze the upload image"
},
{
"inlineData": {
"data": "",
"mimeType": "image/png"
}
}
]
}
}
Google Adk 1.2.1 [google\adk\cli\browser files]
{
"appName": "Agent01",
"userId": "user",
"sessionId": "a5263545-3987-4064-ba38-9550e42287a5",
"newMessage": {
"role": "user",
"parts": [
{
"text": "analyze the upload image"
},
{
"inlineData": {
"displayName": "image1.png",
"data": "",
"mimeType": "image/png"
}
}
]
}
}
I am suspecting because of this change, we are getting additional parameter (displayName) which is not supported by the Gemini API.
Can you please let us know if this is really a bug and any workaround or solution approach to overcome this error?
Screenshot:

Desktop
OS: windows 11
Python version: Python 3.12.10
ADK version: 1.2.1
Contributor guide
Assessment
This issue has not been assessed yet.