You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Ollama models that don't support tools receive tool definitions, causing 400 errors #2787
The inference layer sends tool definitions to ollama models that don't support them (e.g. gemma3:1b-it-qat), causing 400 Bad Request errors: "does not support tools".
Problem
What happened: When a chat request includes tool definitions and routes through an ollama model that doesn't support tools, the request fails with:
{"error":{"message":"registry.ollama.ai/library/gemma3:1b-it-qat does not support tools","type":"invalid_request_error","param":null,"code":null}}
Expected: The inference layer should either:
Strip tool definitions from the request when the model doesn't support tools, OR
Detect the "does not support tools" error and retry without tools, OR
Pre-check model capabilities before sending tools
Impact: 14 events in Sentry (TAURI-RUST-4K7), escalating. Affects any ollama model without tool support. The trace also shows related errors with bge-m3:latest ("does not support chat") — embedding models being used for chat.
Steps to reproduce:
Configure ollama with a model that doesn't support tools (e.g. gemma3:1b-it-qat)
Send a chat message that includes tool definitions
Observe 400 error
Version / Platform: openhuman@0.56.0, Windows 10.0.26200, rustc 1.93.0
Solution (optional)
The ollama provider should handle the "does not support tools" error gracefully. Options:
Best: Query ollama's /api/show endpoint at provider init to check model capabilities, and strip tools for non-supporting models
Simpler: Catch the specific "does not support tools" 400 error and retry the request without tools
Minimum: Strip tools from the request body when the model name is known to not support tools (less robust)
Acceptance criteria
Repro gone — Ollama models without tool support no longer get 400 errors from tool definitions being sent.
Regression safety — Unit test added to verify tool stripping for non-tool-supporting models.
Diff coverage >= 80% — the fix PR meets the changed-lines coverage gate.
Tool-supporting models unaffected — models that DO support tools still receive them.
Activity
orchestrator: route ALL code-repo work to delegate_run_code; strip SK…
fix(inference): suppress Sentry noise when ollama model doesn't suppo…
fix(inference): suppress Sentry noise when ollama model doesn't suppo…