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

gemini-live-2.5-flash-preview doesn't call tools

Open djannot opened this issue 1 year ago β€’ 22 comments

Describe the bug When I use the audio, it responds without using any tool.

And if I have a tool containing an - it complains about it (in the audio).

And when I try to use the text, then I get this error:

{"error": "404 NOT_FOUND. {'error': {'code': 404, 'message': 'models/gemini-live-2.5-flash-preview is not found for API version v1beta, or is not supported for generateContent. Call ListModels to see the list of available models and their supported methods.', 'status': 'NOT_FOUND'}}"}

Desktop (please complete the following information):

  • ADK version(pip show google-adk): 1.5.0

djannot avatar Jun 27 '25 14:06 djannot

Live model doesn't support tools or subagents as far as I know. I tried and met with error.

Apollovishwas avatar Jun 27 '25 14:06 Apollovishwas

you should use gemini-2.0-flash-live-001, it supports API version v1beta and tool calling, but not sure about sub-agents support

https://google.github.io/adk-docs/streaming/custom-streaming-ws/#1.-setup-installation

omanandswami2005 avatar Jun 27 '25 17:06 omanandswami2005

i believe it does support tool calling... I guess it doesn't support sub agents because it doesn't have thinking support? https://cloud.google.com/vertex-ai/generative-ai/docs/models/gemini/2-5-flash#live-api-native-audio

thecloudgeek avatar Jun 29 '25 22:06 thecloudgeek

Got the same error for gemini-2.0-flash-live-preview-04-09

torbilote avatar Jun 30 '25 12:06 torbilote

https://github.com/google/adk-docs/issues/469

I have raised an issue hereπŸ‘†πŸ‘†...!

live agents + sub agents/tool = consumer facing AI apps Hope this will be fixed soon πŸ€˜πŸ™

subhash131 avatar Jul 02 '25 08:07 subhash131

both FC and sub agents is supported. It's tested with this sample: https://github.com/google/adk-python/tree/main/contributing/samples/live_bidi_streaming_multi_agent. Please give it a try.

hangfei avatar Jul 02 '25 15:07 hangfei

@hangfei try adding a custom tool or subagent to the root_agent πŸ‘‡πŸ‘‡πŸ‘‡πŸ‘‡

https://google.github.io/adk-docs/streaming/custom-streaming/#agent-session-management

subhash131 avatar Jul 03 '25 06:07 subhash131

Still seeing this

es/google/adk/tools/google_search_tool.py", line 62, in process_llm_request
    raise ValueError(
        f'Google search tool is not supported for model {llm_request.model}'
    )
ValueError: Google search tool is not supported for model gemini-live-2.5-flash-preview

When trying the following example https://google.github.io/adk-docs/get-started/streaming/quickstart-streaming/

Ans when model is changed to "gemini-2.0-flash-live-001". It works perfectly

ajmeraaxesh avatar Jul 04 '25 16:07 ajmeraaxesh

UPDATE: Google adk 1.5 has a partial fix to this.. now we can use custom tools.

It is still buggy for subagent

Image

subhash131 avatar Jul 05 '25 18:07 subhash131

@subhash131 could you share a minimal example to reproduce?

hangfei avatar Jul 09 '25 22:07 hangfei

Closing as the questions here have been open for a while! Please feel free to re-open with an example.

jwiejulie avatar Aug 08 '25 18:08 jwiejulie

This issue should stay open @jwiejulie as the example at https://google.github.io/adk-docs/get-started/streaming/quickstart-streaming/#agentpy pretty much leads to this error, I tried multiple live models, none worked.

Tested:

  • gemini-2.0-flash-live-001 (suggested model)
  • gemini-live-2.5-flash-preview (latest)
  • gemini-2.5-flash-native-audio-preview-09-2025

dvaldivia avatar Nov 22 '25 20:11 dvaldivia

I just tested against Vertex model and Gemini API model and they both works with search. Make sure you use the right key for the corresponding model(they can't be mixed).

Here is the test code: ADK version 1.19

root_agent = Agent(
   # A unique name for the agent.
   name="basic_search_agent",
   # The Large Language Model (LLM) that agent will use.
   # Please fill in the latest model id that supports live from
   # https://google.github.io/adk-docs/get-started/streaming/quickstart-streaming/#supported-models
  model='gemini-live-2.5-flash-preview-native-audio-09-2025', # vertex
    # model='gemini-2.5-flash-native-audio-preview-09-2025',  # for AI studio key
   # A short description of the agent's purpose.
   description="Agent to answer questions using Google Search.",
   # Instructions to set the agent's behavior.
   instruction="You are an expert researcher. You always stick to the facts.",
   # Add google_search tool to perform grounding with Google search.
   tools=[google_search]
)```

hangfei avatar Nov 23 '25 21:11 hangfei

@hangfei - could you confirm if you've tested with AgentTool given as a tool to the root agent? I am using AI Studio key but fails with the error:

google.genai.errors.ClientError: 404 NOT_FOUND. {'error': {'code': 404, 'message': 'models/gemini-2.5-flash-native-audio-preview-09-2025 is not found for API version v1beta, or is not supported for generateContent. Call ListModels to see the list of available models and their supported methods.', 'status': 'NOT_FOUND'}}

Following is the reproducible code:

MODEL = "gemini-2.5-flash-native-audio-preview-09-2025"

customer_agent = LlmAgent(
    name="customer_agent",
    description="""Answer user queries.""",
    model=MODEL,
    instruction="""Respond warmly""",
)

customer_agent_parent = LlmAgent(
    name="customer_agent_parent",
    description="""Agent to answer using customer_agent.""",
    model=MODEL,
    instruction="""If the user has a query, answer using customer_agent.""",
    tools=[
        AgentTool(agent=customer_agent),
    ],
)

root_agent = customer_agent_parent

TanejaAnkisetty avatar Dec 08 '25 00:12 TanejaAnkisetty

Facing the same issue when using agent as tool

Ashwinikumar1 avatar Dec 15 '25 08:12 Ashwinikumar1

@hangfei I'm still getting the same error when testing against the Google AI Studio API key.

Code:

from google.adk.agents import Agent
from google.adk.tools import google_search  # Import the tool

root_agent = Agent(
   # A unique name for the agent.
   name="basic_search_agent",
   # The Large Language Model (LLM) that agent will use.
   # Please fill in the latest model id that supports live from
   # https://google.github.io/adk-docs/get-started/streaming/quickstart-streaming/#supported-models
   model="gemini-2.5-flash-native-audio-preview-09-2025",  # for example: model="gemini-2.0-flash-live-001" or model="gemini-2.0-flash-live-preview-04-09"
   # A short description of the agent's purpose.
   description="Agent to answer questions using Google Search.",
   # Instructions to set the agent's behavior.
   instruction="You are an expert researcher. You always stick to the facts.",
   # Add google_search tool to perform grounding with Google search.
   tools=[google_search]
)

Error:

404 NOT_FOUND. {'error': {'code': 404, 'message': 'models/gemini-2.5-flash-native-audio-preview-09-2025 is not found for API version v1beta, or is not supported for generateContent. Call ListModels to see the list of available models and their supported methods.', 'status': 'NOT_FOUND'}}

Please I could use some assistance

ecode210 avatar Dec 20 '25 16:12 ecode210

@hangfei - The only model that works for the design pattern of using Agent as a Tool is gemini-2.0-flash-exp. Because it can support both generateContent API and bidiGenerateContent API. In the code below, I filtered out for the bidiGenerateContent API, and you will only see one model that has got the generateContent API

Image

TanejaAnkisetty avatar Dec 22 '25 09:12 TanejaAnkisetty

Are there any google folks out there that can answer when we can get a 2.5 or 3.0 model that supports both generateContent API and bidiGenerateContent API? gemini-2.0-flash-exp is amazing and I want to see it carried forward as I want to do my own TTS.

sethdford avatar Dec 30 '25 14:12 sethdford

Are there any google folks out there that can answer when we can get a 2.5 or 3.0 model that supports both generateContent API and bidiGenerateContent API? gemini-2.0-flash-exp is amazing and I want to see it carried forward as I want to do my own TTS.

+1

Same here

2010b9 avatar Jan 05 '26 10:01 2010b9

As per the dates below (from Google), 2.0 experimental model will also be deprecated on Feb 6th. However, there is no equivalent model in 2.5 or 3.0. Any suggestions here will be highly appreciated. @jwiejulie - could you please reopen the issue given that we don't have a model that we can migrate to?

Image

TanejaAnkisetty avatar Jan 05 '26 17:01 TanejaAnkisetty