Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion llms/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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,
Expand Down