Model: gemini-3-flash-preview
I’ve been experiencing an issue for approximately 3 weeks where function call data leaks into the model’s text response instead of being issued as a proper function call. This happens intermittently, typically in longer multi-turn conversations. I’ve encountered two variations of this issue:
Issue 1: Function call arguments rendered as plain text
Expected behavior: When the model has collected all required information, it should issue a function call (i.e., a functionCall part) with the structured arguments, separate from any text response.
Actual behavior: The model outputs the function call arguments as a raw JSON object directly inside the text response instead of making a proper function call.
User prompt : Collect the patient's full name, date of birth, marital status, gender, assigned gender at birth, and if they have preferred pronouns (Dont list the options, just ask if they have preferred pronouns if no then skip it). Each piece of information should be collected in a separate question. This topic ends once the patient has provided their full name, date of birth (in the format month day year), marital status, gender, assigned gender at birth, and preferred pronouns if applicable.
Model output:
Perfect. Thanks for sharing all that with me, Jamie. I've got those details noted down.
{
"name": "Jamie Carter",
"date_of_birth": "March 12 1989",
"marital_status": "single",
"gender": "female",
"assigned_gender_at_birth": "female",
"preferred_pronouns": "she/her"
}
Issue 2: Hallucinated internal references in text response
Expected behavior: The model’s text response should only contain natural language relevant to the conversation.
Actual behavior: The model outputs appears to be a made up tool name (node _submit _basic_information) as part of its text response. This is not a function name defined in my tool declarations.
Function declaration (applies to both issues):
json
[
{
"function_declarations": [
{
"name": "collect_basic_information",
"description": "Use this to record the patient's basic information once they have provided it. Call this tool once you have collected all the required information for this topic.",
"parameters": {
"type": "object",
"properties": {
"name": { "type": "string", "description": "The patient's full name as provided." },
"date_of_birth": { "type": "string", "description": "The patient's date of birth in month day year format." },
"marital_status": { "type": "string", "description": "The patient's marital status (e.g., single, married, divorced, widowed)." },
"gender": { "type": "string", "description": "The patient's gender identity." },
"assigned_gender_at_birth": { "type": "string", "description": "The patient's assigned gender at birth (e.g., male, female)." },
"preferred_pronouns": { "type": "string", "description": "The patient's preferred pronouns (e.g., he/him, she/her, they/them)." }
},
"required": ["name", "date_of_birth", "marital_status", "gender", "assigned_gender_at_birth", "preferred_pronouns"]
}
}
]
}
]
Additional context:
-
This occurs intermittently, primarily in longer multi-turn conversations.
-
The issue has persisted for approximately 3 weeks.