Skip to content

[CRITICAL] Three LiteLLM bugs blocking Claude models: 4.6 prefill error, tool calling config error (4.5), and large output interruptions #18

Description

@vluciany

[CRITICAL] LiteLLM tool calling error with claude-sonnet-4-5: Missing tools= parameter causes complete session failure

Environment

  • Qodo Command Version: [Run qodo --version and paste here]
  • Model: anthropic/claude-sonnet-4-5
  • Platform: Linux
  • Installation Method: [npm/pip/other]

Description

Qodo Command completely fails to start sessions with claude-sonnet-4-5 due to a LiteLLM configuration error. The system attempts to use tool calling mode but does not pass the required tools= parameter to the Anthropic API.

Error Message

Error: Model error (BadRequest): litellm.BadRequestError: OpenAIException - 
litellm.UnsupportedParamsError: Anthropic doesn't support tool calling without 
`tools=` param specified. Pass `tools=` param OR set `litellm.modify_params = True` 
// `litellm_settings::modify_params: True` to add dummy tool to the request.

Received Model Group=anthropic/claude-sonnet-4-5
Available Model Group Fallbacks=None. 
Received Model Group=claude-sonnet-4-5
Available Model Group Fallbacks=None 
LiteLLM Retried: 2 times, LiteLLM Max Retries: 3

Impact

  • Severity: CRITICAL
  • Effect: Complete inability to use AI assistant
  • Workaround: Must switch to different model (GPT-4, claude-3-7-sonnet)

Root Cause Analysis

Qodo Command's LiteLLM integration is calling the Anthropic API in tool-calling mode but failing to provide either:

  1. The required tools= parameter with tool definitions, OR
  2. The litellm.modify_params = True configuration setting

This suggests a configuration mismatch between Qodo Command's tool registration system and the LiteLLM proxy layer.

Steps to Reproduce

  1. Install Qodo Command (latest version)
  2. Launch with claude-sonnet-4-5: qodo --model claude-sonnet-4-5
  3. Attempt any interaction
  4. Session immediately fails with the error above

Expected Behavior

Qodo Command should either:

  • Pass the tools= parameter with registered tool definitions to LiteLLM
  • Configure litellm.modify_params = True to auto-add dummy tools
  • Properly initialize the tool calling system before making API calls

Additional Context

This is part of a larger pattern of issues with Claude models in Qodo Command:

Related Issues:

  1. BUG A: claude-sonnet-4-6 crashes on every turn due to prefill removal (requires LiteLLM PR #21464)
  2. BUG B: Large output interruptions affecting all models (output size limits)
  3. BUG C: This tool calling configuration error (NEW)

Evidence:

  • 24 documented log entries in attached database
  • Multiple session failures across different Claude models
  • Pattern suggests LiteLLM version/configuration issues

Suggested Fix

  1. Update LiteLLM to latest version (includes PR #21464 for prefill fix)
  2. Add proper tool calling configuration:
    # In Qodo Command LiteLLM setup
    litellm.modify_params = True
    # OR
    # Pass tools parameter explicitly when calling Anthropic API
  3. Ensure tool definitions are properly registered before API calls

Workarounds (Temporary)

Users can work around this by:

# Use OpenAI models
qodo --model gpt-4

# Or use older Claude models
qodo --model claude-3-7-sonnet

# Try environment variable (may not work)
export LITELLM_MODIFY_PARAMS=True
qodo --model claude-sonnet-4-5

Files Available

  • Complete bug analysis database: qodo_session.db (24 entries)
  • Detailed bug report: BUG_REPORT_CRITICAL.md
  • Session logs showing failure pattern

Priority

URGENT - This completely blocks users from using claude-sonnet-4-5, which is one of the primary models for Qodo Command.

Request

Please prioritize:

  1. LiteLLM update to latest version
  2. Tool calling configuration fix
  3. Better error handling for LiteLLM configuration issues

Reported by: [Your GitHub username]
Date: 2026-02-19
Session Database: Available upon request

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions