Gemini 2.5 Flash: 400 Bad Request – Invalid JSON "type" field in function_declarations with Goose 1.12.1
Describe the bug
After a fresh install of Goose 1.12.1 and using the Gemini 2.5 Flash model, I encounter an error when running requests:
Request failed: Request failed with status: 400 Bad Request. Message: Invalid JSON payload received. Unknown name "type" at 'tools.function_declarations[20].parameters.properties[0].value': Proto field is not repeating, cannot start list. Invalid JSON payload received. Unknown name "type" at 'tools.function_declarations[22].parameters.properties[1].value': Proto field is not repeating, cannot start list.
The error indicates an invalid JSON payload with unknown or unexpected "type" fields in the function declarations, causing Gemini API to reject the request.
To Reproduce
Steps to reproduce the behavior:
Fresh install Goose version 1.12.1
Configure Goose to use Google Gemini 2.5 Flash model as the provider
Run a request or session that triggers Gemini tool/function calling
Observe the 400 Bad Request error with invalid JSON payload related to "type" fields
Expected behavior
Gemini 2.5 Flash model should accept the valid function declaration schema generated by Goose without rejecting the request. The API calls should succeed without JSON schema errors. This was working fine prior to the install - I was using 1.93 befor this.
Screenshots
Attached
Please provide following information:
OS & Arch: Windows 10 Pro x64
Interface: CLI (or UI if applicable)
Version: 1.12.1
Extensions enabled: Attached screenshot
Provider & Model: Google - gemini-2.5-flash
Additional context
This appears to be an incompatibility or schema mismatch between Goose's function declaration JSON and the latest Gemini API expectations. The error resembles known issues where Proto fields expect single objects but receive arrays/lists or unsupported fields like "type". Checking Goose's docs troubleshooting and existing GitHub issues shows this is a current problem with the Gemini 2.5 Flash integration. Updating Goose or the schema format may be necessary to resolve this.
+100
I tested this and I think #5530 indeed fixes this (again)