Skip to content

ADK version and Gemini authentication configuration mismatch #2267

Description

@Shaikh-Ahmed

Issue: ADK version and Gemini authentication configuration mismatch

Codelab

Build and Deploy AI Agents with Gemini and BigQuery MCP server in Cloud Run

Problem

In the Create a Data Agent using Agent Development Kit step, the codelab creates requirements.txt with:

google-adk==2.4.*
mcp==1.29.*

However, the environment configuration provided by the codelab sets:

export GOOGLE_GENAI_USE_ENTERPRISE="True"
export GOOGLE_CLOUD_LOCATION="global"

When I run the agent using the provided commands and ask:

What data do you have?

the ADK Web UI fails with:

ValueError: No API key was provided. Please pass a valid API key.

The error indicates that the agent is attempting to use Gemini API-key authentication instead of the configured Google Cloud/Vertex AI authentication.

Expected behavior

The agent should authenticate using the Google Cloud project credentials configured in the codelab and successfully invoke the Gemini model and BigQuery MCP tools.

Environment

  • Codelab: Build and Deploy AI Agents with Gemini and BigQuery MCP server in Cloud Run
  • ADK version specified by codelab: 2.4.*
  • MCP version specified by codelab: 1.29.*
  • Cloud Run location: global

Suggested fix

Please verify whether the codelab should:

  1. Update the pinned google-adk version to a version compatible with GOOGLE_GENAI_USE_ENTERPRISE, or
  2. Use the appropriate Vertex AI environment variable for the pinned ADK version.

The current dependency version and authentication environment variables appear to be inconsistent.

Screenshots

1. Codelab setup configuration

Image Image

The codelab pins google-adk==2.4.* and sets GOOGLE_GENAI_USE_ENTERPRISE="True".

2. Runtime error

Image

The agent fails with ValueError: No API key was provided.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions