You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Interactions API: cannot combine built-in tools with function calling on gemini-3.6-flash / gemini-3.5-flash-lite — server requires tool_config.include_server_side_tool_invocations, but interactions.create() provides no way to set it #2761
On the Interactions API (client.interactions.create), combining a built-in tool (e.g. google_search) with a custom function declaration in the same request fails for the newest models (gemini-3.6-flash, gemini-3.5-flash-lite):
400 INVALID_ARGUMENT: Please enable tool_config.include_server_side_tool_invocations
to use Built-in tools with Function calling.
However, there is no way to satisfy this requirement on the Interactions API:
interactions.create() has no tool_config parameter.
CreateModelInteractionParam / GenerationConfig (the interactions request types in google/genai/_gaos/types/interactions/) contain no tool_config or include_server_side_tool_invocations field.
Injecting the field via extra_body is rejected by the server wherever it is placed (see below).
ToolConfig.include_server_side_tool_invocations was added in #2137, but only to the generate_content / batches / caches / live paths — not to interactions. The same tool combination works on gemini-3.5-flash with no flag, so this is a new-model requirement that the Interactions API surface doesn't yet expose.
Environment
google-genai: reproduced on 2.11.0; the interactions request types still lack tool_config through 2.13.0 (latest).
API: Gemini Developer API (AI Studio key), generativelanguage.googleapis.com.
fromgoogleimportgenaiclient=genai.Client(api_key="<GEMINI_API_KEY>")
tools= [
{"type": "google_search"},
{
"type": "function",
"name": "get_weather",
"description": "Get the weather for a city",
"parameters": {
"type": "object",
"properties": {"city": {"type": "string"}},
"required": ["city"],
},
},
]
# 400: Please enable tool_config.include_server_side_tool_invocations# to use Built-in tools with Function calling.client.interactions.create(
model="gemini-3.6-flash",
input="What's the weather in Paris? Use search if you need to.",
tools=tools,
)
Attempts to supply the flag via extra_body — every placement is rejected server-side:
The request 400s. The server demands tool_config.include_server_side_tool_invocations, but the Interactions API accepts no such parameter — an unsatisfiable requirement. (With thinking_level="medium" the request 400s even earlier — 'medium' is not a supported thinking level for this model. Allowed values are: low, high. — despite the docs listing medium as the default for gemini-3.6-flash; omitting thinking_level or using low/high gets past that, then hits the tool_config error above.)
the Interactions API no longer requires the flag for gemini-3.6-flash / gemini-3.5-flash-lite, matching the documented behavior (built-in + function combination working out of the box, as it does for gemini-3.5-flash).
Notes
Docs pages describing tool combination (interactions/tool-combination) show only gemini-3.5-flash and state no flag is needed — they don't reflect this requirement for the newer models.
Description
On the Interactions API (
client.interactions.create), combining a built-in tool (e.g.google_search) with a customfunctiondeclaration in the same request fails for the newest models (gemini-3.6-flash,gemini-3.5-flash-lite):However, there is no way to satisfy this requirement on the Interactions API:
interactions.create()has notool_configparameter.CreateModelInteractionParam/GenerationConfig(the interactions request types ingoogle/genai/_gaos/types/interactions/) contain notool_configorinclude_server_side_tool_invocationsfield.extra_bodyis rejected by the server wherever it is placed (see below).ToolConfig.include_server_side_tool_invocationswas added in #2137, but only to thegenerate_content/ batches / caches / live paths — not tointeractions. The same tool combination works ongemini-3.5-flashwith no flag, so this is a new-model requirement that the Interactions API surface doesn't yet expose.Environment
google-genai: reproduced on 2.11.0; the interactions request types still lacktool_configthrough 2.13.0 (latest).generativelanguage.googleapis.com.gemini-3.6-flash,gemini-3.5-flash-lite(fails).gemini-3.5-flash(works).Steps to reproduce
Attempts to supply the flag via
extra_body— every placement is rejected server-side:extra_body{"tool_config": {"include_server_side_tool_invocations": True}}Unknown parameter 'tool_config'.{"generation_config": {"include_server_side_tool_invocations": True, ...}}Unknown parameter 'include_server_side_tool_invocations' at 'generation_config'.{"generation_config": {"tool_config": {...}, ...}}Unknown parameter 'tool_config' at 'generation_config'.{"includeServerSideToolInvocations": True}Unknown parameter 'includeServerSideToolInvocations'.Actual behavior
The request 400s. The server demands
tool_config.include_server_side_tool_invocations, but the Interactions API accepts no such parameter — an unsatisfiable requirement. (Withthinking_level="medium"the request 400s even earlier —'medium' is not a supported thinking level for this model. Allowed values are: low, high.— despite the docs listingmediumas the default forgemini-3.6-flash; omittingthinking_levelor usinglow/highgets past that, then hits the tool_config error above.)Expected behavior
One of:
interactions.create()(andCreateModelInteractionParam/GenerationConfig) exposesinclude_server_side_tool_invocations(or atool_config), mirroring feat: Support include_server_side_tool_invocations for genai. #2137 forgenerate_content; orgemini-3.6-flash/gemini-3.5-flash-lite, matching the documented behavior (built-in + function combination working out of the box, as it does forgemini-3.5-flash).Notes
gemini-3.5-flashand state no flag is needed — they don't reflect this requirement for the newer models.