When doing:
{
"model": "gemini-2.5-flash-preview-05-20",
"reasoning_effort": "medium",
"messages": [
{
"role": "user",
"content": "prompt"
}
],
"tools": [
{
"googleSearch": {}
}
]
}
I get:
"data": [
{
"error": {
"code": 400,
"message": "Invalid JSON payload received. Unknown name \"googleSearch\" at 'tools[0]': Cannot find field.",
"status": "INVALID_ARGUMENT",
"details": [
{
"@type": "type.googleapis.com/google.rpc.BadRequest",
"fieldViolations": [
{
"field": "tools[0]",
"description": "Invalid JSON payload received. Unknown name \"googleSearch\" at 'tools[0]': Cannot find field."
}
]
}
]
}
}
]
Am I doing something wrong or is it just not possible with the OpenAI api?