odysseus/static/js
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
..
calendar fix(security): escape backslashes in calendar bg-image CSS url() (#4712) 2026-06-22 21:17:52 +02:00
color fix: theme color parsing breaks on #rgb shorthand hex (#1213) 2026-06-03 00:30:03 +09:00
compare Merge verified Odysseus fixes 2026-07-23 14:49:02 +00:00
editor Merge verified Odysseus fixes 2026-07-23 14:49:02 +00:00
emailLibrary Polish mobile UI and editor workflows 2026-06-27 13:05:44 +00:00
markdown Ignore non-string markdown table rows (#1648) 2026-06-03 14:17:02 +09:00
model fix: model cost/info matches first substring key (gpt-4o-mini billed as gpt-4o) (#1439) 2026-06-04 03:05:37 +01:00
research Show thumbnails on past research cards 2026-06-30 08:00:01 +00:00
util fix: monthly schedule label shows 21th/22th/31th (ordinal suffix for days >20) (#1577) 2026-06-03 08:57:47 +09:00
a11y.js Improve accessibility across core flows (#86) 2026-06-01 22:04:00 +02:00
admin.js Merge verified Odysseus fixes 2026-07-23 14:49:02 +00:00
assistant.js refactor(tools): move model-interaction tools to the agent_tools registry (#4445) 2026-06-18 05:56:37 +00:00
calendar.js Merge dev into main for testing 2026-06-28 14:07:23 +00:00
censor.js Ignore censor preference storage errors (#1652) 2026-06-03 14:16:55 +09:00
chat.js fix(chat): only leave agent mode when the model really has no tool support 2026-07-25 22:10:41 +02:00
chatRenderer.js Merge verified Odysseus fixes 2026-07-23 14:49:02 +00:00
chatStream.js Merge verified Odysseus fixes 2026-07-23 14:49:02 +00:00
codeRunner.js Fix/windows llama cpp serve and test upstream (#2669) 2026-06-05 14:53:33 +02:00
colorPicker.js Odysseus v1.0 2026-05-31 23:58:26 +09:00
composerArrowUpRecall.js Merge verified Odysseus fixes 2026-07-23 14:49:02 +00:00
cookbook-deps-recipes.js Merge verified Odysseus fixes 2026-07-23 14:49:02 +00:00
cookbook-diagnosis.js Merge verified Odysseus fixes 2026-07-23 14:49:02 +00:00
cookbook-hwfit.js Merge verified Odysseus fixes 2026-07-23 14:49:02 +00:00
cookbook.js Merge verified Odysseus fixes 2026-07-23 14:49:02 +00:00
cookbookDownload.js Checkpoint Odysseus local update 2026-07-07 00:50:07 +00:00
cookbookPorts.js fix(cookbook): only block model launch on real port collisions (#4760) 2026-06-24 19:44:09 +02:00
cookbookProgressSignal.js Don't falsely declare a dependency build stale (#1568) (#1768) 2026-06-03 13:23:35 +09:00
cookbookRunning.js Merge verified Odysseus fixes 2026-07-23 14:49:02 +00:00
cookbookSchedule.js Cookbook UI: Ollama browser, advanced serve fold, API tokens form, diagnosis toolbar, polish 2026-06-09 09:46:19 +09:00
cookbookServe.js Merge verified Odysseus fixes 2026-07-23 14:49:02 +00:00
document.js Merge verified Odysseus fixes 2026-07-23 14:49:02 +00:00
documentLibrary.js Merge verified Odysseus fixes 2026-07-23 14:49:02 +00:00
dragSort.js Odysseus v1.0 2026-05-31 23:58:26 +09:00
emailInbox.js Merge verified Odysseus fixes 2026-07-23 14:49:02 +00:00
emailLibrary.js Merge verified Odysseus fixes 2026-07-23 14:49:02 +00:00
emailShared.js Polish mobile UI and editor workflows 2026-06-27 13:05:44 +00:00
emojiPicker.js fix(modal): keep body-portaled dropdowns above their tool modal at any stack depth (#4720) (#4724) 2026-06-23 10:24:31 +02:00
emojiShortcodes.js Render emoji shortcodes as icons in chat (#345) (#629) 2026-06-05 02:28:42 +02:00
escMenuStack.js fix: make transient dropdown/popup menus close on Escape 2026-06-01 14:23:22 -04:00
fileHandler.js Merge verified Odysseus fixes 2026-07-23 14:49:02 +00:00
gallery.js Merge verified Odysseus fixes 2026-07-23 14:49:02 +00:00
galleryEditor.js Merge verified Odysseus fixes 2026-07-23 14:49:02 +00:00
group.js fix: group selection drop-downs recreation and repopulation logic (#3424) 2026-06-26 13:35:25 +01:00
init.js Merge verified Odysseus fixes 2026-07-23 14:49:02 +00:00
keyboard-shortcuts.js fix: _matchesCombo crashes on non-string keybind from server (#2049) 2026-07-11 03:15:19 +01:00
langIcons.js fix: langIcon throws on an explicit null opts argument (#1740) 2026-06-03 13:29:21 +09:00
markdown.js fix(markdown): stop currency dollars rendering as KaTeX inline math (#5132) 2026-07-11 14:45:57 +01:00
memory.js Merge verified Odysseus fixes 2026-07-23 14:49:02 +00:00
modalManager.js Merge verified Odysseus fixes 2026-07-23 14:49:02 +00:00
modalSnap.js Merge remote-tracking branch 'origin/dev' into test-main-dev-merge-20260615 2026-06-15 21:20:15 +09:00
modelPicker.js Merge verified Odysseus fixes 2026-07-23 14:49:02 +00:00
models.js Merge verified Odysseus fixes 2026-07-23 14:49:02 +00:00
modelSort.js Ignore invalid model sort inputs (#1653) 2026-06-03 14:16:52 +09:00
MODULE_SUMMARY.md fix(cleanup): update MODULE_SUMMARY and remove dead MEMORY_DOC paths (#4411) (#5160) 2026-07-11 17:06:19 +01:00
notes.js Merge verified Odysseus fixes 2026-07-23 14:49:02 +00:00
package.json Fix test suite: ESM module loading and stub isolation (#844) 2026-06-02 11:29:29 +09:00
platform.js Ignore AltGr keystrokes in Ctrl+Alt keyboard shortcuts (#825) 2026-06-02 11:12:54 +09:00
presets.js fix: group selection drop-downs recreation and repopulation logic (#3424) 2026-06-26 13:35:25 +01:00
providerDeviceFlow.js feat: add ChatGPT Subscription provider (#2876) 2026-06-08 10:19:18 +02:00
providers.js feat(discovery): detect llama.cpp servers and label local providers (#4729) 2026-06-23 23:39:56 +02:00
rag.js Odysseus v1.0 2026-05-31 23:58:26 +09:00
researchSynapse.js Odysseus v1.0 2026-05-31 23:58:26 +09:00
search-chat.js Merge verified Odysseus fixes 2026-07-23 14:49:02 +00:00
search.js Odysseus v1.0 2026-05-31 23:58:26 +09:00
section-management.js Fix Models section collapse dead pause and missing animation 2026-06-01 16:53:46 +02:00
sessions.js Merge verified Odysseus fixes 2026-07-23 14:49:02 +00:00
settings.js Merge verified Odysseus fixes 2026-07-23 14:49:02 +00:00
sidebar-layout.js Merge verified Odysseus fixes 2026-07-23 14:49:02 +00:00
signature.js Constrain signature uploads to PNG data (#2844) 2026-06-05 13:17:43 +02:00
skills.js fix(ui): route tasks.js + skills.js dropdowns through topPortalZ() (#4768) 2026-06-24 22:29:36 +02:00
slashAutocomplete.js feat: add ChatGPT Subscription provider (#2876) 2026-06-08 10:19:18 +02:00
slashCommands.js Merge verified Odysseus fixes 2026-07-23 14:49:02 +00:00
spinner.js Merge verified Odysseus fixes 2026-07-23 14:49:02 +00:00
storage.js feat(a11y): add a Text size control and an OpenDyslexic font option (#4210) 2026-06-22 13:53:46 +02:00
streamingRenderer.js fix(chat): stop code-block button flicker during streaming (#3023) 2026-06-06 04:08:54 -06:00
streamingSegmenter.js fix(chat): stop code-block button flicker during streaming (#3023) 2026-06-06 04:08:54 -06:00
tasks.js Merge verified Odysseus fixes 2026-07-23 14:49:02 +00:00
theme.js feat(a11y): add a Text size control and an OpenDyslexic font option (#4210) 2026-06-22 13:53:46 +02:00
tileManager.js fix(ui): restore all-edge modal snap zones (#2260) 2026-06-15 12:36:34 +02:00
toolWindowZOrder.js fix(modal): keep body-portaled dropdowns above their tool modal at any stack depth (#4720) (#4724) 2026-06-23 10:24:31 +02:00
tourAutoplay.js Odysseus v1.0 2026-05-31 23:58:26 +09:00
tourHints.js Odysseus v1.0 2026-05-31 23:58:26 +09:00
tts-ai.js Odysseus v1.0 2026-05-31 23:58:26 +09:00
ui.js Merge verified Odysseus fixes 2026-07-23 14:49:02 +00:00
voiceRecorder.js Odysseus v1.0 2026-05-31 23:58:26 +09:00
windowDrag.js fix(windowDrag): disable duplicate top-edge fullscreen snap (#3495) 2026-06-15 16:10:40 +09:00
windowResize.js Make tool windows resizable by dragging edges or corners 2026-06-01 19:49:23 +02:00
workspace.js feat(agent): confine agent file/shell tools to a selectable workspace (#3665) 2026-06-11 18:17:54 +02:00