Commit Graph
3 Commits
Author SHA1 Message Date
yetone dd260b4a3a trae: #434's "max" is the app's 1M-window Max switch, not a level (comments)
hbw169 (#434) on trae 0.2.23, TRAE CN: magpie model efforts prints
"low high xhigh" for deepseek-v4.1-flash and deepseek-v4.1-flash-max.
Their screenshot of the TRAE CN app's DeepSeek V4.1 Flash card shows
思考强度 轻 / 高 / 极高 only (light / high / extra_high, the plugin's
low / high / xhigh), and a separate 更大上下文 (Max) switch: "1M window,
more credits". That switch is the plugin's deepseek-v4.1-flash-max model
(maxModel, the list's __max entry with context_window_tokens.max), which
the reporter already has. So the plugin offers exactly what the app does.

Magpie's side passes a plugin model's variants through unchanged
(internal/provider/plugins.go: c.Efforts = m.Variants; provider.Levels
holds max), so it doesn't narrow anything either.

0.2.23's comments said the app offers DeepSeek V4.1 Flash max as a level.
That was wrong; they now say what the screenshot shows. No code change,
no version bump: LEVELS keeps medium/max for a list that names them.

Run: packages/trae, HOME=$(mktemp -d) bun test on mote: 221 pass, 0 fail.
Broken by hand: nothing; comment-only.
Not tried: a real TRAE CN account's model list; the read rests on the
reporter's screenshot and the client binary's field names
(reasoning_effort_config, reasoning_effort_options,
default_reasoning_effort, context_window_tokens), not a captured list.
2026-10-29 01:13:35 +08:00
yetone c20fa331a0 trae 0.2.23: a model whose entry names max (or medium) offers it and sends it (#434)
huajii (#434): Trae's app offers DeepSeek V4.1 Flash at max, the plugin
does not.

Cause: LEVELS knew only light/high/extra_high, so levelsOf dropped any
other option an entry's reasoning_effort_config names, and effortOf never
sent it. Trae's client names five levels (its bundle's
reasoning_effort.{low,medium,high,extra_high,max}, handed out per model by
remote config, per dsh-connect-trae #60's read of the client bundle). An
entry naming max beside the three lost it.

Fix: LEVELS spells medium and max as themselves. They are offered only
for a model whose entry names them, and a model that names none still
sends nothing for them.

Run:
- packages/trae: bun test 215 pass, 0 fail. The two new tests in
  reasoning.test.mjs (levels/variants/chatBody with max and medium; max
  reaching llm_utils_chat through the loader's fetch) were red on the old
  LEVELS line (2 fail, max undefined), green with it.
- HOME=$(mktemp -d) bun test at the repo root: 2902 pass, 3 skip, 0 fail;
  bun scripts/check.mjs: ok.

Not tried: a real Trae account. The wire name "max" in options comes from
the client's i18n keys, not a captured list; on 10-25 a live CN list named
only light/high/extra_high (dsh-connect-trae #60, plugins #300). If Trae's
"max" in the app is the Max mode instead, the plugin's
deepseek-v4.1-flash-max model is that and is unchanged here.
2026-10-28 00:46:08 +08:00
hspnick 8e479f1171 trae 0.2.20: every chat function's roster is read, and a model's levels are kept (#300)
Every chat function's roster is read, so each model's reasoning levels come from Trae's own config, and a model keeps its levels in magpie and in plain OpenCode (#300, sphuang1030-prog).

- A model in the fallback table keeps the levels its entry names, even though the host hands every model `variants: {}`.
- A variant's value is OpenCode's name (low/high/xhigh); effortOf takes either spelling and sends Trae's (light/high/extra_high), and nothing for a level the model doesn't name.
- The token-keyed record check that never fired is gone; the host's strict refresh reads the list again after a re-sign-in.

Reviewed at 4b968adb: bun test in packages/trae (temp HOME/TMPDIR) 203 pass / 0 fail on bun 1.4.2; bun scripts/check.mjs exit 0. The three new tests go red on the previous head 41904d9. Probes through the loader's fetch: low→light, high→high, xhigh→extra_high; medium/__proto__ send nothing; glm-5.2 fallback gives high, xhigh (was []). merge-tree against main clean; npm latest trae 0.2.19.
Not tried: a real Trae account; OpenCode's own source (whether it fills default variants first).
2026-10-23 09:57:37 +08:00