[BUG]: v1alpha support for Live API in Google AKD Agents
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
Noticing the same issue
oi
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