#25390 Anthropic /v1/messages streaming drops tool_use.input for gemini/gemma-4-31b-it while non-streaming works
Describe the bug When using LiteLLM’s Anthropic-compatible /v1/messages endpoint with a Gemma 4 route backed by gemini/gemma-4-31b-it, tool calling works in non-streaming mode but fails in streaming mode.
With the exact same request payload:
non-streaming returns a correct tool_use block with populated input streaming returns a tool_use block with input: {}
This breaks streaming agent clients like Claude Code / Cline because the client receives an empty tool call and then complains that required tool parameters are missing.
LiteLLM model route
- model_name: gemma-4-31b litellm_params: model: gemini/gemma-4-31b-it api_key: ...
Request payload (non-streaming)
{ "model": "gemma-4-31b", "max_tokens": 256, "messages": [ { "role": "user", "content": "Use grep_tool with pattern exactly GetExerciseAnchors and path exactly lib/domain/repositories/workout_set_repository.dart. Do not answer normally." } ], "tools": [ { "name": "grep_tool", "description": "Search for a pattern in a file", "input_schema": { "type": "object", "properties": { "pattern": { "type": "string" }, "path": { "type": …