Bundled catalog is generated from command-code@1.44.0; CLI is at 1.53.0. Models added upstream since then are missing from MODEL_REASONING/MODEL_EFFORTS, so their reasoning can never be enabled.
Example: deepseek/deepseek-v4.1-flash
Upstream registry (command-code@1.53.0, dist/cli.mjs):
DEEPSEEK_V4_1_FLASH:{id:"deepseek/deepseek-v4.1-flash",reasoning:!0,
reasoningEfforts:["low","high","max"],contextWindow:1e6}
Bundled catalog: absent from both MODEL_REASONING and MODEL_EFFORTS → reasoning: false, no levels.
The endpoint accepts it fine; the parameter is simply never sent.
Other models affected (reasoning:true upstream, absent locally): minimax/minimax-m3-free (low/medium/high), tencent/Hy3, gpt-6-astra (low/medium/high/xhigh/max).
Root cause
MODEL_EFFORTS/MODEL_REASONING drive everything, and commandcode-catalog-overrides.ts only offers MODEL_EFFORT_OVERRIDES — an efforts hook. There is no way to override the reasoning flag, so a model missing from the generated catalog stays permanently non-reasoning:
src/core.ts:145 — if (!level || level === "off" || !model.reasoning) return undefined → reasoning_effort never sent
index.ts:137 — compat.supportsReasoningEffort: MODEL_EFFORTS[model.id] !== undefined → false
src/models.ts:86 — thinkingMetadataForModel returns undefined for any id not in MODEL_REASONING
So MODEL_EFFORT_OVERRIDES alone can't fix it either — efforts without the flag still hit the core.ts:145 guard.
Reproduce
pi -p --model commandcode/deepseek/deepseek-v4.1-flash --thinking max --no-session "prove it thinks"
# no reasoning content, no reasoning tokens
Workaround (works today, no fork needed)
~/.pi/agent/models.json:
{"providers":{"commandcode":{"modelOverrides":{
"deepseek/deepseek-v4.1-flash":{
"reasoning":true,
"thinkingLevelMap":{"minimal":null,"low":"low","medium":null,"high":"high","xhigh":null,"max":"max"},
"compat":{"supportsReasoningEffort":true}
}}}}}
All three are required — reasoning clears the core.ts:145 guard, thinkingLevelMap maps pi levels, and compat.supportsReasoningEffort is what actually puts the field on the wire.
Verified against a local echo server: --thinking high → reasoning_effort:"high", max → "max", off → absent. Against the real endpoint, a hard prompt returns thinking content (e.g. 219 reasoning tokens); low correctly returns none.
Suggested fix
Either bump COMMAND_CODE_CLI_VERSION and re-run npm run sync:commandcode-catalog (fixes all four, but drifts again), or add a reasoning-flag override to commandcode-catalog-overrides.ts:
export const MODEL_REASONING_OVERRIDES: Readonly<Record<string, true>> = {
"deepseek/deepseek-v4.1-flash": true,
// ...
}
merged into MODEL_REASONING in src/models.ts alongside MODEL_EFFORT_OVERRIDES, so newly added upstream models can be enabled without waiting for a catalog sync. Note the daily drift check (check:commandcode-catalog) currently only compares the generated file, so it doesn't catch models that upstream added but the pinned version never had.
Bundled catalog is generated from
command-code@1.44.0; CLI is at1.53.0. Models added upstream since then are missing fromMODEL_REASONING/MODEL_EFFORTS, so their reasoning can never be enabled.Example:
deepseek/deepseek-v4.1-flashUpstream registry (
command-code@1.53.0,dist/cli.mjs):Bundled catalog: absent from both
MODEL_REASONINGandMODEL_EFFORTS→reasoning: false, no levels.The endpoint accepts it fine; the parameter is simply never sent.
Other models affected (
reasoning:trueupstream, absent locally):minimax/minimax-m3-free(low/medium/high),tencent/Hy3,gpt-6-astra(low/medium/high/xhigh/max).Root cause
MODEL_EFFORTS/MODEL_REASONINGdrive everything, andcommandcode-catalog-overrides.tsonly offersMODEL_EFFORT_OVERRIDES— an efforts hook. There is no way to override the reasoning flag, so a model missing from the generated catalog stays permanently non-reasoning:src/core.ts:145—if (!level || level === "off" || !model.reasoning) return undefined→reasoning_effortnever sentindex.ts:137—compat.supportsReasoningEffort: MODEL_EFFORTS[model.id] !== undefined→falsesrc/models.ts:86—thinkingMetadataForModelreturnsundefinedfor any id not inMODEL_REASONINGSo
MODEL_EFFORT_OVERRIDESalone can't fix it either — efforts without the flag still hit thecore.ts:145guard.Reproduce
Workaround (works today, no fork needed)
~/.pi/agent/models.json:{"providers":{"commandcode":{"modelOverrides":{ "deepseek/deepseek-v4.1-flash":{ "reasoning":true, "thinkingLevelMap":{"minimal":null,"low":"low","medium":null,"high":"high","xhigh":null,"max":"max"}, "compat":{"supportsReasoningEffort":true} }}}}}All three are required —
reasoningclears thecore.ts:145guard,thinkingLevelMapmaps pi levels, andcompat.supportsReasoningEffortis what actually puts the field on the wire.Verified against a local echo server:
--thinking high→reasoning_effort:"high",max→"max",off→ absent. Against the real endpoint, a hard prompt returns thinking content (e.g. 219 reasoning tokens);lowcorrectly returns none.Suggested fix
Either bump
COMMAND_CODE_CLI_VERSIONand re-runnpm run sync:commandcode-catalog(fixes all four, but drifts again), or add a reasoning-flag override tocommandcode-catalog-overrides.ts:merged into
MODEL_REASONINGinsrc/models.tsalongsideMODEL_EFFORT_OVERRIDES, so newly added upstream models can be enabled without waiting for a catalog sync. Note the daily drift check (check:commandcode-catalog) currently only compares the generated file, so it doesn't catch models that upstream added but the pinned version never had.