When Claude Code sends requests through LiteLLM to non-Anthropic models (e.g. Qwen 3 Coder on LM Studio), Anthropic-specific tool definitions must be converted to OpenAI function-calling format. This conversion can produce malformed tools that the downstream model cannot use.
tool_param_sanitizer.py is a LiteLLM CustomLogger callback that intercepts requests in async_pre_call_hook and fixes tool definitions before they reach the model.