adk-samples icon indicating copy to clipboard operation
adk-samples copied to clipboard

[BUG]: v1alpha support for Live API in Google AKD Agents

Open bhavyajoshi-mahindra opened this issue 3 months ago • 3 comments

How do I use 'gemini-live-2.5-flash-preview-native-audio-09-2025' in Google ADK agents. I am facing this issue:

from google.adk.agents import Agent
import os 

from google.genai.types import (
    GenerateContentConfig,
    HarmBlockThreshold,
    HarmCategory,
    SafetySetting,
)

from .prompts import AGENT_INSTRUCTION

genai_config = GenerateContentConfig(
    temperature=0.5
)

root_agent = Agent(
   name='agents',
   model="gemini-2.5-flash-native-audio-preview-09-2025",
   description="A helpful AI assistant.",
   instruction=AGENT_INSTRUCTION
)

I am getting this logs:

Starting client_to_agent_messaging task Connection closed: received 1008 (policy violation) models/gemini-live-2.5-flash-preview-native-audio-09-2025 is not found for API version v1alpha, or is not supported for bid; then sent 1008 (policy violation) models/gemini-live-2.5-flash-preview-native-audio-09-2025 is not found for API version v1alpha, or is not supported for bid. Error in agent_to_client_messaging loop: received 1008 (policy violation) models/gemini-live-2.5-flash-preview-native-audio-09-2025 is not found for API version v1alpha, or is not supported for bid; then sent 1008 (policy violation) models/gemini-live-2.5-flash-preview-native-audio-09-2025 is not found for API version v1alpha, or is not supported for bid agent_to_client_messaging task finished

Google AKD version : 1.19.0

bhavyajoshi-mahindra avatar Nov 20 '25 17:11 bhavyajoshi-mahindra

Noticing the same issue

LeighamSpringer-Sutton avatar Nov 29 '25 14:11 LeighamSpringer-Sutton

oi

mateusbatista3184-star avatar Dec 03 '25 02:12 mateusbatista3184-star

The error occurs because ADK is using the Vertex AI model name format, but the model may not be available or the API version is incorrect. Fix it as follows: Set these environment variables:

GOOGLE_GENAI_USE_VERTEXAI=FALSE
GOOGLE_API_KEY=your_api_key_here

wnqqnw19 avatar Dec 04 '25 19:12 wnqqnw19