openclaw/ui
HCL be20eebc21 fix(ui): resolve model provider from catalog instead of stale session default
When the server returns a bare model name (e.g. "deepseek-chat") with
a session-level modelProvider (e.g. "zai"), the UI blindly prepends
the provider — producing "zai/deepseek-chat" instead of the correct
"deepseek/deepseek-chat". This causes "model not allowed" errors
when switching between models from different providers.

Root cause: resolveModelOverrideValue() and resolveDefaultModelValue()
in app-render.helpers.ts, plus the /model slash command handler in
slash-command-executor.ts, all call resolveServerChatModelValue()
which trusts the session's default provider. The session provider
reflects the PREVIOUS model, not the newly selected one.

Fix: for bare model names, create a raw ChatModelOverride and resolve
through normalizeChatModelOverrideValue() which looks up the correct
provider from the model catalog. Falls back to server-provided provider
only if the catalog lookup fails. All 3 call sites are fixed.

Closes #53031

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: HCL <chenglunhu@gmail.com>
2026-03-23 21:54:02 -07:00
..
public
src fix(ui): resolve model provider from catalog instead of stale session default 2026-03-23 21:54:02 -07:00
index.html UI: add corner radius slider and appearance polish (#49436) 2026-03-17 23:06:01 -05:00
package.json chore: update dependencies except carbon 2026-03-22 08:37:03 -07:00
vite.config.ts feat(ui): dashboard-v2 views refactor (slice 3/3 of dashboard-v2) (#41503) 2026-03-12 12:46:19 -05:00
vitest.config.ts build: update deps and fix vitest 4 regressions 2026-03-13 01:02:00 +00:00
vitest.node.config.ts