Skip to content

fix: upgrade litellm to >=1.81.0 to fix Claude Code tool call compatibility#86

Open
liuruing wants to merge 3 commits into1rgs:mainfrom
liuruing:fix-litellm-version
Open

fix: upgrade litellm to >=1.81.0 to fix Claude Code tool call compatibility#86
liuruing wants to merge 3 commits into1rgs:mainfrom
liuruing:fix-litellm-version

Conversation

@liuruing
Copy link

@liuruing liuruing commented Mar 6, 2026

Summary

  • Upgrade litellm dependency from >=1.77.7 to >=1.81.0

Problem

Claude Code tool calls were failing with error "each tool_use must have a single result. Found multiple tool_result blocks". This is a known incompatibility issue between older LiteLLM versions and Claude Code's tool result format.

Solution

LiteLLM v1.81.0+ includes the fix for this issue (PR #17632). Upgrading resolves the tool call failures.

Reference

liuruing added 3 commits March 6, 2026 14:39
The code previously only converted tool_calls to tool_use blocks for Claude models
(starting with 'claude-'). Other models would have their tool calls converted to
plain text, causing Claude Code to not recognize them as actual tool calls.

This fix ensures all models properly return tool_use blocks when they have
tool_calls in their response.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant