diff --git a/llms/main.py b/llms/main.py index d58339d..0b78ff6 100755 --- a/llms/main.py +++ b/llms/main.py @@ -1353,6 +1353,9 @@ def __init__(self, **kwargs): super().__init__(**kwargs) # Ollama's OpenAI-compatible endpoint is at /v1/chat/completions self.chat_url = f"{self.api}/v1/chat/completions" + # Allow disabling server-side tool execution via providers.json + # When False, tool_calls pass through to the client untouched + self.tool_call_enabled = kwargs.get("tool_call", True) async def load(self): if not self.models: @@ -1400,7 +1403,7 @@ async def load_models(self): "id": k, "name": v.replace(":", " "), "modalities": {"input": ["text"], "output": ["text"]}, - "tool_call": True, + "tool_call": self.tool_call_enabled, "cost": { "input": 0, "output": 0,