Unable to use Fetch extension with Gemini
Describe the bug
When configured to use Google models, specifically gemini-2.0-flash-exp, an error occurs when attempting to use the Fetch extension:
Request failed: Request failed with status: 400 Bad Request. Message: * GenerateContentRequest.tools[0].function_declarations[22].parameters.properties[url].format: only 'enum' is supported for STRING type . Please retry if you think this is a transient or recoverable error.
This happens because Fetch uses format: uri in its JSON schema which Google doesn't support.
To Reproduce Steps to reproduce the behavior:
- Configure Goose to use a Gemini LLM
- Enable built-in Fetch extension
- Prompt Goose to fetch data from the web
Expected behavior With other LLMs, Goose is able to successfully fetch data from the web
Screenshots
Please provide following information:
- OS & Arch: macOS M2 Max
- Interface: CLI and UI
- Version: 1.0.5
- Extensions enabled: Fetch
- Provider & Model: Google - gemini-2.0-flash-exp
it may be prudent to refactor the bug to extend it to any gemini-2.0-flash based tool, not just the -exp flag
detail can be found here: https://github.com/block/goose/issues/1029#issuecomment-2629204340