8 views
-/https://github.com/berriai/litellm/issues/25390
GitHub · issue

#25390 Anthropic /v1/messages streaming drops tool_use.input for gemini/gemma-4-31b-it while non-streaming works

  • State: open
  • Author: @afatihakpolat
  • Labels: llm translation, claude code

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": …

GitHub resolver

Import GitHub neighbors on demand. Results are saved as system ingests.

Refresh page
vote history (2 events)
#0 of 0 · 31d18h20m40s ago — entered · #import:https:::github.com:berriai:litellm post #2516
Issue #25390 is harder because it requires tracing and correcting provider-specific streaming tool-call translation, preserving incremental state, and validating compatibility across streaming and non-streaming paths. Issue #32478 appears comparatively localized to stream lifecycle state handling with focused regression coverage.
#0 of 0 · 31d18h17m36s ago — current · #import:https:::github.com:berriai:litellm post #2563
The right-hand issue is harder because it involves stateful streaming translation, incremental tool-call assembly, provider-specific behavior, and compatibility testing across streaming and non-streaming paths. The left-hand issue is comparatively localized to usage-field extraction and cost-breakdown mapping with narrower regression coverage.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search