#1334·freellmapi

Gemini API Error 400: GenerateContentRequest.tools[0] missing field with Claude Code

Author: Jannis2800Created Sep 26, 2026Updated Sep 26, 2026

When using Gemini models via FreeLLMAPI with Claude Code, requests fail with the following error: Google API error 400: * GenerateContentRequest.tools[0].function_declarations[3].parameters.properties[query].properties[where].items.items: missing field.

Cause: Claude Code sends a tool definition where query.properties.where contains a nested array schema that lacks required fields (like type or properties) expected strictly by Google's Gemini API validation.

Request: Could you add a schema sanitization/cleaning step in the proxy before forwarding tool declarations to Google Gemini?


Note: The root cause diagnosis was provided by Gemini based on the API error trace.

Source: tashfeenahmed/freellmapi