From acc74afc51e1e8a6b0aed65c31b20faf23d7b5cc Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Wed, 11 Mar 2026 21:53:10 -0700 Subject: [PATCH] Update litellm/responses/mcp/litellm_proxy_mcp_handler.py Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> --- litellm/responses/mcp/litellm_proxy_mcp_handler.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/litellm/responses/mcp/litellm_proxy_mcp_handler.py b/litellm/responses/mcp/litellm_proxy_mcp_handler.py index f79c3fff173..254faa57b6e 100644 --- a/litellm/responses/mcp/litellm_proxy_mcp_handler.py +++ b/litellm/responses/mcp/litellm_proxy_mcp_handler.py @@ -105,10 +105,10 @@ class LiteLLM_Proxy_MCP_Handler: # by rewriting them to the internal litellm_proxy format. m = _PROXY_MCP_PATH_RE.match(server_url) if m: - rewritten = dict(tool) - rewritten["server_url"] = ( + rewritten = {**tool, "server_url": ( f"{LITELLM_PROXY_MCP_SERVER_URL_PREFIX}{m.group(1)}" - ) + )} + mcp_tools_with_litellm_proxy.append(rewritten) mcp_tools_with_litellm_proxy.append(rewritten) else: other_tools.append(tool)