Files
plugins/packages/cowork/test
yetone 3b41dda9fd cowork 0.1.1: seed magpie's reasoning levels as extras.thinkingEfforts
seed.mjs now writes extras.thinkingEfforts {default, options} on an entry
when magpie's /v1/models lists levels for the model
(supported_reasoning_levels objects first, else the flat reasoning_levels),
deduped. That is the shape Cowork's model menu reads to draw its
Reasoning row. magpie names no default, so default is medium, else high,
else the highest level that isn't none (a default_reasoning_level that
is one of the options wins). Entries seed recorded before get their
levels refreshed on the next run, other extras keys kept, and dropped
when the catalog drops the levels; --check counts that as drift
("~N reasoning levels to update"). Entries not in the record are not
touched.

Cowork 2.1.6-stable doesn't read it. From its core (codely-binary,
unpacked): a custom model's extras are rebuilt each time, and the
settings.json extras field isn't among the fields read (id, displayName,
model, providerId, roles, baseUrl, authType, apiKeyMasked, wireApi,
supportsMultimodal, extra_body, timeout, maxRetries). Reasoning comes
only from extra_body.reasoning_effort, as one fixed option. seed doesn't
write that: it would pin an effort on every request and still give one
option. The README says so and gives the Extra Body workaround. The
canary channel serves 1.1.7-canary.2, which has no thinkingEfforts code;
2.1.7-canary.4 couldn't be downloaded (404).

Run on mote at bf0a37f6 plus this change:
- packages/cowork: node --test, 56/56 pass (6 new tests, one a real
  seed run: --check exit 1 "+1 to add, ~1 reasoning levels to update",
  write, --check exit 0).
- node scripts/mutate.mjs: all mutations caught, 9 of them new (no
  extras spread, no objects source, no flat source, no dedupe, no
  medium/high preference, named default ignored, no refresh, no
  refreshed count, other extras keys dropped).
- bun scripts/check.mjs cowork: ok.
- bun test with HOME=$(mktemp -d): 6763 pass, 20 skip, 0 fail.
origin/main moved since then only outside packages/cowork and scripts.

Not tried: a real Cowork run with the seeded file, 2.1.7-canary.4, and
Windows (Cowork isn't installed on the Windows box).

No magpie mover or min references cowork.

Refs #828

Reported-by: LiShengYang-yiyi
2026-11-07 17:04:53 +08:00
..