A2UI
A2UI copied to clipboard
Can't run Restaurant finder application with GEMINI_API_KEY - LiteLLM tries to use Vertex credentials
I'm having an issue where when I run the restaurant finder app, I get an error like:
File "/Users/jsimionato/development/A2UI/a2a_agents/python/.venv/lib/python3.13/site-packages/litellm/llms/vertex_ai/vertex_llm_base.py", line 123, in load_auth
raise ValueError("Could not resolve project_id")
ValueError: Could not resolve project_id
ERROR:LiteLLM:Failed to load vertex credentials. Check to see if credentials containing partial/invalid information. Error: Could not resolve project_id
Traceback (most recent call last):
File "/Users/jsimionato/development/A2UI/a2a_agents/python/.venv/lib/python3.13/site-packages/litellm/llms/vertex_ai/vertex_llm_base.py", line 490, in get_access_token
_credentials, credential_project_id = self.load_auth(
~~~~~~~~~~~~~~^
credentials=credentials, project_id=project_id
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/Users/jsimionato/development/A2UI/a2a_agents/python/.venv/lib/python3.13/site-packages/litellm/llms/vertex_ai/vertex_llm_base.py", line 123, in load_auth
I'm surprised by this, because I'm setting GEMINI_API_KEY and not providing vertex credentials.
To workaround this, I had to hack to change:
LITELLM_MODEL = os.getenv("LITELLM_MODEL", "gemini-2.5-flash")
to
LITELLM_MODEL = os.getenv("LITELLM_MODEL", "gemini/gemini-2.5-flash")
In a2a_agents/python/adk/samples/restaurant_finder/agent.py.
We should make sure it's easy to use the sample agents with just an API key, because it's too hard to set up Vertex casually.
CC @dmandar
This would be great. I ran into this issue. I was able to get Vertex setup, but then when it said I needed to attach a billing account, I bailed.