SIGN IN SIGN UP

fix(ollama): check model template for tool support via /api/show (#11670)

fix(ollama): check model template for tool support before sending tools

Ollama models only support tool calling if their template includes
.Tools. The heuristic in toolSupport.ts was too broad, causing 400
errors for models whose templates lack tool support.

Two changes:
- Query /api/show template for .Tools (same pattern as existing .Suffix
  FIM check) and skip sending tools when the template says no
- Exclude Ollama cloud models (:cloud tag) in the heuristic, since
  cloud tool calling is unreliable

Fixes #9639 #9646 #9875 #10304 #10461 #10539 #10561 #10593 #10640
Fixes #10672 #10833 #10876 #11308 #11382 #11402
D
Dallin Romney committed
ced1e3c86bde55bb2e639f392e005aa25dccab3e
Parent: 93c437c
Committed by GitHub <noreply@github.com> on 3/24/2026, 7:45:42 PM