[BUG] Conversational Agent crash : ACTION_GENERATION: ANY mode is only supported with function calling

Hello,

I wanted to report a blocking bug we are facing with Looker Conversational Agents.

Our Looker conversational agent consistently crashes when attempting to generate charts after successfully retrieving data. The agent’s internal system prompt includes a directive to always call transfer_to_agent for Python-based chart generation. This call fails with:

ACTION_GENERATION: ANY mode is only supported with function calling.

In the Agent thinking, I can see the following :

The instructions I’ve got, *perfect timing*, specified to prefer line charts for trend analysis within this context! The next step is to prepare the call to `transfer_to_agent`. This agent is crucial for all the Python-based analysis and chart generation, so it’s essential to ensure I’m using it correctly. I recall the explicit instructions: “CRITICAL: FOR DOING PYTHON ANALYSIS ON THE DATA AND GENERATING THE CHARTS ALWAYS CALL THIS SUB AGENT.” Well, I’ve got the data, and I’m ready to visualize those trends. The final step is to prepare my call to `transfer_to_agent`. I’m ready!

But then, it crashes for some reason, and the output the user gets is:

I'm still learning and can't help with that. Try a different request.

This is an issue because the user sees “I’m still learning and can’t help with that” followed by “Failed to fetch answers” even though the underlying data query executed successfully and returned correct results.

Notes:

  • The failure is intermittent : chart generation works sometimes and crashes other times, with no apparent difference in the query or data

  • The data retrieval step (Looker query) succeeds 100% of the time : only the transfer_to_agent step fails

  • The agent’s built-in system instruction (“CRITICAL: FOR DOING PYTHON ANALYSIS ON THE DATA AND GENERATING THE CHARTS ALWAYS CALL THIS SUB AGENT”) means this code path is triggered on virtually every query, even when a chart isn’t requested by the user

  • We attempted to override this behavior via custom agent instructions (e.g. “Do NOT call transfer_to_agent”), but the agent detects the conflict between our instructions and the system prompt, reasons about it, and then crashes (this means there is no customer-side workaround for this bug)

Thank you for your help on this

cc @marout if you can look into this and forward to the team; this causes major instabilities for Looker Conversational Agent feature.

May be linked to this issue : `FunctionCallingConfigMode.ANY` and CallableTool - How to terminate? · Issue #908 · googleapis/js-genai · GitHub

For my tests, here are the patterns I observed:

  • Fails: agent retrieves data AND calls transfer_to_agent in the same turn

  • Works: “Give me the chart” → chart generation is the only task in that turn

  • Works: “Top 5 products” → multiple queries create intermediate steps, so chart generation lands in a separate step naturally

The crash likely happens when the Gemini API switches from AUTO mode (for data queries) to ANY mode (for chart generation) within a single turn. When chart generation is the only task in a turn, the mode is set correctly from the start.

@NicoG07 please report this issue with support so it is documented. Looker Support details  |  Google Cloud Documentation

@marout I filled a GCP Support ticket case (if that’s what you meant by support), here’s the Case Number : 69999656

I also passed this to conversational-analytics-feedback@google.com

Let me know if I need to do anything else so you can adress this. I remain available if any details are needed, but again, this is currently quite blocking

1 Like

Thank you! I just heard back that this is a known issue and they are working on it.

Great, thank you! Let me know when you have more details about the fix, and do not hesitate if you need details from me to reproduce etc…