Skip to content

[Interactions API] interactions.get with include_input=True returns None for user input during requires_action state #2823

Description

@Debbouha

Bug Description

The interactions.get(id="...", include_input=True) method completely omits the initial user prompt and fails to return any user_input fields or steps if the interaction stopped at a requires_action (function call) state. This contradicts the official documentation which states: "The stored resource (retrieved via interactions.get) also includes user_input steps for full context".

To Reproduce

  1. Call client.interactions.create() with a text input and a tools declaration.
  2. The model correctly returns a function_call step, setting the interaction status to requires_action.
  3. Call client.interactions.get(id=..., include_input=True) on that exact interaction ID.

Code Example

from google import genai

light_tool = {
    "type": "function",
    "name": "set_light_values",
    "description": "Sets the brightness of a light.",
    "parameters": {
        "type": "object",
        "properties": {"brightness": {"type": "integer"}},
        "required": ["brightness"]
    }
}

client = genai.Client()

# 1. Create interaction that triggers a function call
interaction = client.interactions.create(
    model="gemini-3.5-flash-lite",
    input="Turn the lights down to 20%",
    tools=[light_tool],
)

# 2. Fetch the interaction with include_input=True
fetched = client.interactions.get(id=interaction.id, include_input=True)

# 3. Bug demonstration
print("Expected string, Got:", fetched.input) 
# Expected: "Turn the lights down to 20%"
# Actual: None

print("Expected 'user_input' step, Got:", [s.type for s in fetched.steps])
# Expected: Includes 'user_input'
# Actual: ['thought', 'function_call']

Expected Behavior

The returned payload should populate the top-level input string field or include a clear user_input step within the history timeline so developers can map the pending tool call back to the original user intent.

Actual Behavior

The input attribute is strictly None, and the original prompt text is completely stripped/unavailable from the fetched resource until the entire lifecycle is completed.

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