Activity
Mon
Wed
Fri
Sun
Oct
Nov
Dec
Jan
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
What is this?
Less
More

Memberships

AI Developer Accelerator

9.9k members โ€ข Free

1 contribution to AI Developer Accelerator
ADK Vertex AI Issue
Hello, Can someone please help with this issue: Getting an error when creating a basic agent with GOOGLE_GENAI_USE_VERTEXAI=TRUE Followed all gcloud cli steps to authenticate and configure project, enable Vertex AI APIs etc., HTTP/1.1 401 Unauthorized" 2025-09-17 21:41:46,793 - ERROR - adk_web_server.py:1076 - Error in event_generator: 401 UNAUTHENTICATED. {'error': {'code': 401, 'message': 'API keys are not supported by this API. Expected OAuth2 access token or other authentication credentials that assert a principal.
0 likes โ€ข 6d
Thank you all so much for offering to help. Here's my project structure (very simple): agent.py import os from dotenv import load_dotenv from google.adk import Agent load_dotenv() root_agent = Agent( name="transcript_summarization_agent", description="Summarizes chat transcripts.", model=os.getenv("MODEL", "gemini-2.5-flash"), instruction="Summarize the provided chat transcript.", ) .env: GOOGLE_GENAI_USE_VERTEXAI=TRUE GOOGLE_CLOUD_PROJECT=basic-ai-agent-471801 GOOGLE_CLOUD_LOCATION=us-central1 MODEL=gemini-2.5-flash Here's the error it gives: {"error": "Your default credentials were not found. To set up Application Default Credentials, see https://cloud.google.com/docs/authentication/external/set-up-adc for more information."} It works fine if I set GOOGLE_GENAI_USE_VERTEXAI=FALSE and supply GOOGLE_DEFAULT_CREDENTIALS=<my API key> Can you please help?
0 likes โ€ข 6d
@Purendeeswar Reddy Thanks for your response. If I generate a SA Json Key, how should that be used in the agent.py code?
1-1 of 1
Anu Ramesh
1
2points to level up
@anu-ramesh-9263
Director Software Engineering

Active 6d ago
Joined Sep 18, 2025
Powered by