Skip to content

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

Description

@rizwankce

Description

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.
  • Models: gemini-3.6-flash, gemini-3.5-flash-lite (fails). gemini-3.5-flash (works).

Steps to reproduce

from google import genai

client = 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:

extra_body Server response
{"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. (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.)

Expected behavior

One of:

  1. interactions.create() (and CreateModelInteractionParam / GenerationConfig) exposes include_server_side_tool_invocations (or a tool_config), mirroring feat: Support include_server_side_tool_invocations for genai. #2137 for generate_content; or
  2. 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

Metadata

Metadata

Labels

priority: p2Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions