mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-30 01:08:33 +00:00
A forced `mcp` tool_choice under drop_params is now dropped only on routes whose config drops hosted MCP tools, and it is dropped together with that tool. Each chat config reports this through `hosted_mcp_tool_handling(model)` as "drops", "runs" or "forwards", and the drop helper reads the same value, so the two cannot drift apart. Routes that forward hosted MCP tools, such as OpenRouter, xAI, Groq and Mistral, keep the merge base's 400 whatever drop_params says, so nothing reaches the provider. OCI and Ollama now report "drops", which matches how their transformations already treat the tools. On OCI a forced `mcp` choice used to fail with an OCIError and now drops with its tool
The 400 now names the one cause that applies: drop_params is off, the request sent no tool for that server, the tool_choice names no server, the provider runs hosted MCP itself, or the route forwards hosted MCP tools. A forced LiteLLM MCP gateway server now gets its own 400 on every route, before any tool listing or model call. Batch rows and real-time calls use the same text
When the saved toolset read fails in block mode, the mcp_security guardrail now answers 503 with a try-again message and keeps `unverified_servers`. A server that is known to be unregistered still gets the policy 400. Alert mode is unchanged
Uploads that name no model now apply `router_settings.default_litellm_params.drop_params`, with the batch row value and a `files_settings` drop_params still winning. The batch remedy no longer limits the router default to uploads that name a model, and its row wording is now true for any value that does not turn dropping on, such as "no" or 0
(cherry picked from commit
|
||
|---|---|---|
| .. | ||
| __init__.py | ||
| conftest.py | ||
| test_aresponses_api_with_mcp.py | ||
| test_chat_completions_handler.py | ||
| test_litellm_proxy_mcp_handler.py | ||
| test_mcp_streaming_iterator.py | ||
| test_tool_precheck.py | ||