From fc9ee293e23d1b22b467aa4c57eecd99bff48835 Mon Sep 17 00:00:00 2001 From: Meryem Sakin Date: Thu, 10 Sep 2026 22:00:50 +0300 Subject: [PATCH] fix(ollama): keep routing suppression on assignment line --- litellm/main.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/litellm/main.py b/litellm/main.py index 9b81cec1c7e..5bcfeaebce9 100644 --- a/litellm/main.py +++ b/litellm/main.py @@ -5310,9 +5310,7 @@ def completion( if custom_llm_provider == "ollama" and (tools or functions): custom_llm_provider = "ollama_chat" # rebind-ok: /api/generate has no native tool calling if api_base is not None: - api_base = api_base.rstrip("/").removesuffix( - "/api/generate" - ) # rebind-ok: preserve generate URLs for native tool requests + api_base = api_base.rstrip("/").removesuffix("/api/generate") # rebind-ok: chat path elif custom_llm_provider == "ollama": tools = None # rebind-ok: empty tools must not change plain completion behavior functions = None # rebind-ok: empty functions must not change plain completion behavior