odysseus/static
Matthieu 78262a39e3 fix(chat): only leave agent mode when the model really has no tool support
Both checks match a bare "tool" or "auto" anywhere in the error text,
which catches a lot that has nothing to do with tool support: a tool
timing out, an MCP server dropping, any message containing "automatic".

At the first site the consequences are not cosmetic. The real error is
replaced with "This model doesn't support agent tools", so the actual
cause is lost. The UI leaves agent mode. And the choice is written to
localStorage, so every later message in that conversation also runs
without tools, with nothing on screen explaining why.

It presents as "agent mode works in a new chat but not in this one",
which sends you looking at the model, the session, or the endpoint
rather than at a substring match in the error path. Diagnosing it took
a while precisely because the message you are shown is the one thing
that is not true.

The second site is milder -- it appends a hint rather than switching --
but appending "this model may not support tools" to an unrelated
failure still points the user at the wrong fix.

Match the provider's actual wording instead. Ollama returns
"<model> does not support tools"; the pattern also covers "doesn't
support tools" and "tools are not supported". The original error text
is kept in both cases so a genuine failure stays diagnosable.

Checked against the strings that used to misfire -- "tool execution
timed out", "MCP server not connected", "automatic retry failed",
"tool_choice auto is invalid", "peer closed connection" -- none of
which now demote, while the three real phrasings still do.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-25 22:10:41 +02:00
..
fonts feat(a11y): add a Text size control and an OpenDyslexic font option (#4210) 2026-06-22 13:53:46 +02:00
icons Cookbook model workflow fixes 2026-06-21 11:02:35 +00:00
js fix(chat): only leave agent mode when the model really has no tool support 2026-07-25 22:10:41 +02:00
lib Odysseus v1.0 2026-05-31 23:58:26 +09:00
app.js Merge verified Odysseus fixes 2026-07-23 14:49:02 +00:00
icon.ico feat(launcher): add portable windows launcher (#976) 2026-06-16 04:58:16 +01:00
index.html Merge verified Odysseus fixes 2026-07-23 14:49:02 +00:00
login.html fix(auth): centralize password and username validation constants (#4120) 2026-06-16 09:52:15 +02:00
manifest.json pwa missing icons added (#428) 2026-06-15 16:00:13 +09:00
modal-control-variants.html Merge verified Odysseus fixes 2026-07-23 14:49:02 +00:00
style.css Merge verified Odysseus fixes 2026-07-23 14:49:02 +00:00
sw.js Merge verified Odysseus fixes 2026-07-23 14:49:02 +00:00
wave-variants.html Merge verified Odysseus fixes 2026-07-23 14:49:02 +00:00
whirlpool-variants.html Merge verified Odysseus fixes 2026-07-23 14:49:02 +00:00