supports_tools exists per-endpoint in the DB but has no UI control — manually added Ollama endpoints silently locked to fragile text parsing
Prerequisites
- I searched open issues and discussions and did not find an existing report of this bug.
- This is not a security vulnerability. (Vulnerabilities go to GitHub Security Advisories — see SECURITY.md.)
- I am running the latest code from the
devbranch (the default branch you get on clone, where fixes land first) and the bug still reproduces there. Pleasegit pullthe latestdevbefore filing.
Install Method
Windows native (launch-windows.ps1)
Operating System
Windows
Steps to Reproduce
- Add an Ollama endpoint manually via Settings → Add Models (OpenAI-compatible /v1 URL, e.g. http://localhost:11434/v1)
- Look anywhere in the Settings UI for a way to enable native tool calling / function schemas for that endpoint
- In agent mode, ask a Qwen3-family model on that endpoint to do any file/shell task
Expected Behaviour
Either a visible per-endpoint toggle for supports_tools (the DB column's comment says it "can be toggled per-endpoint in the UI"), or native tool calling enabled/auto-detected by default for Ollama-style local endpoints — so the agent sends real function schemas and receives structured tool_calls.
Actual Behaviour
No such control exists anywhere in the UI. The model_endpoints.supports_tools flag is only ever set two ways:
- Automatically during Cookbook auto-registration (static/js/cookbookRunning.js ~line 3988, from --enable-auto-tool-choice or a model-name regex) — which never runs for manually added endpoints, or
- Via the endpoints PATCH API directly.
A manually added Ollama endpoint therefore stays NULL, and the heuristic in src/agent_loop.py (~lines 2719-2737) forces fenced-text tool parsing with no way to change it from the UI.
Impact: combined with #5187, this is a one-two punch for Ollama users — native tool calling is silently off with no way to turn it on, while the text-parsing fallback doesn't recognize the formats Qwen models actually emit. Net result: agents that talk but never execute tools.
Verification that the flag is the fix: setting supports_tools=true via the PATCH API immediately enabled native tool calling for both of my Qwen models — Ollama returns proper structured tool_calls with finish_reason: tool_calls, and the agent then completed a full multi-round file/shell/python task end-to-end (logs below).
Logs / Screenshots
Before (supports_tools NULL, text parsing):
2026-07-03 18:02:43,843 - src.agent_loop - INFO - Agent round 1 summary: 1560 chars, 0 native calls, 0 tool blocks. Preview: [bash]mkdir -p agent-test[/bash]...
After (supports_tools=true via PATCH API, same model, same prompt):
- Round summaries show native_tools=True with structured calls
- Agent executed get_workspace, bash, write_file, and python across multiple rounds, self-corrected on failures, and completed the task (created benchmark script, ran it, reported 3478.71 MB/s, cleaned up test file)Model / Backend (if relevant)
Ollama + qwen3-vl:32b and Qwen3.6-35B-A3B (HF GGUF import, hf.co/HauhauCS)
Are you willing to submit a fix?
Partially — I can help but need guidance
Additional Information
Related: #5187 covers the text-parsing side of this (Qwen <tool_call> JSON format not recognized by parse_tool_blocks). Fixing either one helps; fixing both closes the gap completely for Ollama users. Suggested direction for this issue: expose the toggle per endpoint in Settings → Added Models, and/or default supports_tools to true (or probe the endpoint's tools capability) for Ollama-style local endpoints.
Source: odysseus-dev/odysseus