Commit 393c925
authored
fix: show actionable error when Ollama fails to parse tool calls (#11870)
* fix: show actionable error when Ollama fails to parse tool calls
When Ollama models (e.g. gpt-oss:20b) produce malformed tool call
output, Ollama returns "error parsing tool call" which previously
surfaced as an opaque "Unknown error".
Add pattern matching in analyzeError() to detect this specific error
and show a helpful message explaining the issue is transient, that the
user can resubmit, and that enabling "Only use system message tools"
in Settings > Experimental avoids Ollama's native tool call parser.
Fixes #11783, #11063, #10954, #10897, #10711, #10221, #9433
* fix: refine Ollama tool call error copy and matching
Tighten string match to "error parsing ollama response: error: error
parsing tool call" to avoid false positives. Soften settings suggestion
to "Enabling ... may reduce these errors".
* fix: match on Ollama's error string directly1 parent 9396142 commit 393c925
1 file changed
+9
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
149 | 149 | | |
150 | 150 | | |
151 | 151 | | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
152 | 161 | | |
153 | 162 | | |
154 | 163 | | |
| |||
0 commit comments