Commit Graph
3 Commits
Author SHA1 Message Date
yetone be5e8f29f1 dsh: its own models are the two it ships, deepseek-flash named DeepSeek-V4.1-Flash (Kylin_Cloud on X)
Kylin_Cloud (X, 11-06, v0.1.2606): DeepSeek Harness's direct models in
magpie listed deepseek-v4-flash, which dsh doesn't have, and showed
deepseek-flash as "DeepSeek-V41-Flash"; dsh's built-ins are only
DeepSeek-V4.1-Flash and DeepSeek-V4-Pro.

Cause: dshModels is a table copied by hand from dsh 0.1.5 (4091b9dfd),
not generated from models.dev and not a label prettifier. dsh's own
table is @deepseek-ai/dsh-llm-deepseek's DEFAULT_MODELS; packed from npm:
  0.1.0-rc.8, 0.1.2-rc.1  deepseek-v4-flash, deepseek-v4-pro (+ vision-exp)
  0.1.5-rc.3              deepseek-flash "DeepSeek-V41-Flash", v4-flash, v4-pro
  0.1.6-alpha.2..0.2.0    deepseek-flash "DeepSeek-V41-Flash", deepseek-v4-pro
  0.2.1-rc.5, 0.2.2-rc.1  deepseek-flash "DeepSeek-V4.1-Flash", deepseek-v4-pro
The installed dsh here (0.2.1-rc.2) has the same two. So "V41" was dsh's
own name from 0.1.5 to 0.2.0, kept after dsh renamed it, and
deepseek-v4-flash left dsh in 0.1.6 while magpie kept offering it.
No other code makes a label from "4.1": V41 is in dsh.go alone.

Now dshModels is dsh's two, named as dsh 0.2.1 on names them. The WSL
(stopped distro) picker reads the same table.

A profile already starting on deepseek-v4-flash: magpie reads it as it is
and doesn't rewrite settings.yaml or the patch list; it is no longer
offered in the list. Since dsh 0.1.6 dsh itself refuses it
(dsh-api-session-controller requireModel: "Select an available model
before sending a message.", it checks listModels, i.e. DEFAULT_MODELS),
so that start was already broken in dsh before this change; picking
either model in magpie or in dsh fixes it.

Siblings pinning the old three: internal/gui's TestAgentOwnModelsHidden
(red under the full suite with the new table, now dsh's two) and the GUI
fixture agent-models-own.test.cjs, which also had made-up labels.

Run (mote, rebased on origin/main f47390bf3):
- TestDshOwnModelsAreDshs: red on the old table (lists deepseek-v4-flash,
  "DeepSeek-V41-Flash"), and red again with only the label fixed (still
  lists deepseek-v4-flash); green with the change.
- go test ./internal/agent: ok.
- node --test agent-models-own.test.cjs (chromium + webkit, en/zh/de/ja,
  narrow and wide): 16/16 ok. i18n-keys: "a plugin's words are its own"
  red, the same three words already filed (#5327, #5332, #5426, #5482),
  not touched by this change.
- go vet ./..., GOOS=linux go vet -tags nogui ./..., GOOS=windows go vet
  ./..., GOOS=linux/windows go build: ok. gofmt -l: nothing.
- go test -timeout 45m ./... (shared lock): every package ok but gui and
  provider. gui: TestAgentOwnModelsHidden (fixed above), and
  TestMainWindowCorners (#3949) and TestPanelHiddenByWailsMarksPageOutOfSight
  (#5322), both filed; provider: TestRenewLoginsKeepsClaudeReading (#5481,
  filed). After the fix go test ./internal/gui: only TestMainWindowCorners
  (#3949) red.

Not tried: a real dsh session started on deepseek-v4-flash (the refusal
above is read from dsh's source); dsh before 0.1.5 (it had no
deepseek-flash; every dsh on npm since 0.1.6 has it); Windows/WSL run.

At the pushed head (rebased on b020ae102, which touches gateway, provider
and agent's Claude Desktop only): go vet ./internal/agent ./internal/gui,
go test ./internal/agent -run Dsh and ./internal/gui -run
TestAgentOwnModels: ok.
2026-11-06 16:51:15 +08:00
yetone ce8b67de37 gui tests: a page's first load gets a minute, not a click's 5s (#4470)
claude-switch-only set page.setDefaultTimeout(5000) and then called
page.goto with no timeout of its own, so Playwright held the first load
of app.js, i18n.js and the plugins to the 5s bar meant for clicks. On a
busy box (a whole-suite run at load 130-160) that load took longer and
goto timed out. The same pattern is in 988 GUI test files (1174 pages):
every one of them now also sets setDefaultNavigationTimeout(60000) on
the same page, right after its default, so goto, reload and waitForURL
wait on the load itself with room, while clicks and waits keep their
short bar. group-from-model-add's own 20s navigation bar is raised to the
same minute. claude-switch-only also gives its first provider row (drawn
from the page's first reads) a minute before clicking it.

nav-timeout.test.cjs (no browser) reads every GUI test file and names
each page given a default under a minute without a navigation timeout of
at least a minute, so a new file can't bring the pattern back.

What was run (WSL magpie-desktop, Playwright 1.62.0, load 70-260 from
other sessions):
- node --check on every file in internal/gui/tests: all parse.
- nav-timeout.test.cjs against origin/main's test files: red (names the
  1174 pages); against this tree: its only reds were my own probe copies
  of the old files, since removed.
- By hand: claude-switch-only with app.js served 7s late (a busy box's
  first load), --test-name-pattern "1100 en": origin/main's file 4 of 4
  red with "page.goto: Timeout 5000ms exceeded"; this file 4 of 4 green.
- claude-switch-only.test.cjs, both engines, en/zh/ja/de, 1100 and 420:
  32 of 32. group-from-model-add, usage-access-key-card and i18n-keys:
  green. agent-plugin-agents: Chromium green; WebKit's de 420 subtest red
  on a 5s waitForFunction at line 115 (a wait after load, not the
  navigation), at load ~230.

Not tried: the whole GUI suite (about 1000 files; the change is one
mechanical line per page), Windows or mote (mote's browsers, #4125).
2026-10-31 02:09:18 +08:00
yetone 94fd332c35 agent, gui, tui: an agent's own models can be left out of its model picker (#1642, MizuIro-H)
DeepSeek Harness offers its own DeepSeek models beside magpie's in its
model picker, and nothing in magpie could leave them out: `magpie visible`
and the model list only cover magpie's catalog. An agent's model list now
has a switch at the top, "Show {agent}'s own models", for an agent that
has models of its own. Off, its picker offers magpie's alone.

- settings.OwnModelsHidden lists the agents whose own models are left
  out. provider.OwnModelsHidden / SetOwnModelsHidden read and write it.
  POST /api/settings keeps it: the Settings page doesn't send it.
- agent.Picks(f, cur) is a field's options without the agent's own
  (no Ref, a value). It leaves them in when the field has no magpie
  option at all, and always keeps the value the agent is set to now, so
  the user's own choice isn't dropped or rewritten. The GUI's agent
  fields and the TUI picker read it. The CLI still sets an own model by
  name.
- GET /api/agent-models/{id} says `own` and `ownHidden`. POST
  {ownHidden} sets it. The GUI's switch rolls back if the save fails,
  and closing the list filters the picker at once, before the state is
  read again. The order view (magpie's models alone) hides the switch.
- Strings in zh, zh-TW, ja, de.

Run: go test ./internal/agent ./internal/provider ./internal/settings
./internal/tui, all green. go test ./internal/gui is green apart from
TestTrayCellClickReleasedPanel, which fails the same alone on
origin/main ee20a1511 (#1661). The new TestAgentOwnModelsHidden goes red
with Picks returning every option. The GUI suites agent-*, gui-*, i18n-*
and settings-* pass 424/424. The new agent-models-own.test.cjs runs in
Chromium and WebKit, en/zh/de/ja, at 420 and 1100 wide, and goes red with
the close-time filter taken out. gofmt is clean, and linux and windows
vet are clean (gui on windows only).

Not tried: the real dsh in the live GUI.
2026-10-12 01:29:57 +08:00