AutoGen Studio returns 'undefined' error with Google Gemini despite correct configuration
What happened?
Hello,
I am encountering a persistent 'undefined' system error in AutoGen Studio v0.4.2.2 on Windows when trying to use the Google Gemini API.
The agent configuration in the UI is correct, but any prompt results in an 'undefined' error.
We have already tried the following troubleshooting steps without success:
- A complete clean reinstallation of autogenstudio and pyautogen (deleting venv, purging pip cache).
- Installing the
google-generativeailibrary. - Generating a new Google API key.
- Using a diagnostic script, we confirmed the API key can list available models successfully.
- Using the exact model name provided by the
list_models()function (e.g.,models/gemini-1.5-pro-latest). - Activating the full billing account on the Google Cloud project, moving it out of the Free Trial.
Despite all these steps, the UI still shows a generic 'undefined' error, suggesting that the real API error message is being suppressed by AutoGen Studio.
Which packages was the bug in?
AutoGen Studio (autogensudio)
AutoGen library version.
Python dev (main branch)
Other library version.
No response
Model used
Google Gemini API
Model provider
None
Other model provider
No response
Python version
None
.NET version
None
Operating system
None
can you show a screenshot of your configuration view? Do you have the base url configured? https://ai.google.dev/gemini-api/docs/openai
{
"provider": "autogen_ext.models.openai.OpenAIChatCompletionClient",
"component_type": "model",
"version": 1,
"component_version": 1,
"description": "Gemini 2.5",
"label": "gemini-2.5-pro",
"config": {
"model": "gemini-2.5-pro",
"model_info": {
"vision": false,
"function_calling": true,
"json_output": false,
"family": "unknown",
"structured_output": false
},
"base_url": "https://generativelanguage.googleapis.com/v1beta/openai/",
"api_key": "your_key"
}
}
see #6957