when sending request to generate_content using function call tool that has parameters_json_schema that includes ‘additionalProperties‘ in the schema, the API responds with MALFORMED_FUNCTION_CALL error.
When omitting the ‘additionalProperties‘ field from the schema, the model accepts the function call definition and responds with the function call when needed.
Sending a schema with ‘additionalProperties‘ worked until yesterday (!!!).
Here is a sample function call that fail the API call:
types.FunctionDeclaration(
name="lookup",
description="lookup a person record",
parameters_json_schema={
"type": "object",
"properties": {
"first_name": {"type": "string","description": "the person first name"},
"last_name": {"type": "string", "description": "the person last name"},
"children": {
"type": "object",
"description": "each key is the child name and the value is the child age",
"additionalProperties": {"type": "integer"},
},
},
"required": [],
}
)
I’m using gemini-3-flash-preview using python SDK.