commandcode 0.1.18: Jev (typesafe/jev), Command Code's decision model, can be picked in magpie

joeliu96872540 on X: magpie couldn't get Command Code's typesafe/jev.
Command Code's /provider/v1/models (94 models) doesn't list it; the CLI
(command-code 1.88.2, read from its bundle, not run) knows it as
SYSTEM_ONE_MODELS ["typesafe/jev"], asked at POST /provider/v1/systemone
with {model, state, questions} and buildCommandAuthHeaders, answered with
{model, answers, usage}. That is magpie's System One shape.

- config sets decide: true on the provider and adds Jev to its models,
  marked decides (magpie's plugin decision API, yetone/magpie#1514).
- provider.models adds Jev, marked, to every plan's list (Go's, the live
  one, the default standing in); Command Code decides which plans may ask.
- fetch sends a /systemone question as the CLI does: its headers
  (User-Agent cli, x-command-code-version 1.88.2, project slug, session,
  Bearer key, x-cmd-zdr when ZDR is on), not the chat's x-api-key, with
  Jev's other names (jev, jev-latest, typesafe-ai/jev) sent as
  typesafe/jev. The answer goes back as it came; a refusal through
  failure(), the account kept; a Go plan's "no API access" keeps the key
  as Go's.
- The plan-list tests that count chat models leave Jev out (talking()).

Run: bun test in packages/commandcode on mote: 72 pass, 1 skip (as
before), 0 fail; bun scripts/check.mjs all green. Broken by hand (the
/systemone branch, decide and withJev turned off): 6 of jev.test.mjs's 8
go red; the ZDR and Go-refusal cases pass either way, as the generic
Provider API path does the same for them.

Not tried: a real Command Code account (none in a sandbox HOME), so no
real /systemone answer has been seen, nor which plans Command Code lets
ask Jev.
This commit is contained in:
yetone
2026-10-29 14:52:38 +08:00
parent 644038d95a
commit dec921767e
8 changed files with 274 additions and 13 deletions
+13
View File
@@ -125,6 +125,19 @@ as taking them when it is a Claude model, or when the default list or the
CLI's table says so. For any other model the plugin says nothing either
way, and magpie answers from models.dev, as its built-in did.
## Jev, a decision model
Command Code serves TypeSafe's Jev (`typesafe/jev`), a decision model: it
answers typed questions (`{"state", "questions"}`) with probabilities, and
holds no conversation. Its `/models` list doesn't name it, so the plugin
adds it to every plan's list, marked `decides`, and sets `decide` on the
provider. magpie then offers it as a routing group's classifier and at its
`/v1/systemone` (as `commandcode-plan/typesafe/jev`), never to an agent to
chat with. A question goes to `POST /provider/v1/systemone` as the CLI
(1.88.2) sends it, with the CLI's headers, and Zero Data Retention when the
switch is on. Command Code decides which plans may use it; a refusal reaches
magpie with its status, as a chat's does.
## Not included
- Usage and quota (`/alpha/billing/credits`, the 5-hour and weekly windows).