feat(runtime): offer Command Code GO thinking levels #5484
All Vouch review confidence checks passed
Residual risk 0.18 = Change Risk (0.45) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.45 · 404 lines diff across 5 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.359
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #5484"
general
weight: 0.35
M4n5ter
Problem
Command Code GO is the only Command Code plan without Provider API access, so it rides the CLI's
/alpha/generatetransport. That transport acceptsreasoning_effort, and thecommandcode-clibranch inmodel-factory.tsalready maps a level onto it — but the level never arrives: the thinking-level switcher does not appear forcommandcode-go(or plaincommandcode).The cause is a metadata miss, not a wire gap. Command Code exposes no reasoning metadata:
GET /provider/v1/models(public, no key) returns 70 models with onlyid,object,created,owned_by,name,context_length,supported_endpoints.GET /provider/v1/models/<id>is 404 — not a registered route.model-metadata.generated.tshas zerocommandcodeentries.So
lookupModelMetadata('commandcode-go', id)returns{},thinkingOptionsForModelreturnsundefined,thinkingVariantsForModelreturns[], and the UI hides the switcher by convention. That leaves themodel-factory.tsmapping as dead code.Change
Add a static per-model table in
model-metadata.ts(COMMAND_CODE_MODEL_METADATA), wired to bothcommandcodeandcommandcode-go. The levels are ported fromMars-Sea/dsh-commandcode-provider'sKNOWN_EFFORTS(MIT), which was re-verified againstcommand-code@1.53.0's bundled model table (dist/cli.mjs, the provider effort map). Because models.dev has no entry for the provider,lookupModelMetadatareturns the static override directly, so the full chain lights up with no change to the relay gating.Two rules from the reference are preserved and documented in the source:
KNOWN_THINKING_MODELS) carry no selectable effort. They stay out of the table, so no selector is offered for them — matching the CLI, which omitsreasoning_effortfor them.Also drop the
max->highdowngrade in thecommandcode-clibranch ofmodel-factory.ts.maxis a real CLI effort word (claude-fable-5-1,moonshotai/Kimi-K3,gpt-5.6-*, ...), and the reference forwards the level verbatim; the downgrade silently sent a weaker request than the user chose.Tests
packages/core/src/__tests__/model-metadata.test.ts: the table serves both providers; every declared effort is a knownThinkingLevel; a model with no declared level stays uncovered.packages/runtime/src/__tests__/model-factory-thinking.test.ts: selectable efforts surface; automatic-reasoning models expose nothing; an unknown model exposes and sends nothing; the chosen level — includingmax— is forwarded verbatim.Caveat
The ported table was verified against
command-code@1.53.0; this branch pinscommand-code@1.54.0, and the CLI bundle was not re-read for 1.54.0. The header comment records the source and version so a future re-sync can re-read the pinned bundle. A wrong effort word is refused by the wire or ignored by the model, so it fails loudly rather than mis-billing.