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