Conversation
|
The
Making the mock match on the path instead of the full URL fixes it — one Happy to add that as a second commit on this branch, or to open it as a separate PR if you would rather keep this one to the reasoning change — whichever you prefer. I did not touch |
|
Thanks for the diagnosis and regression coverage. Superseded by merged #98, which brings the upstream reasoning flag and low/high/max efforts for DeepSeek V4.1 Flash into the generated catalog, together with the self-healing sync in #95. No additional reasoning-override layer is needed for data already published upstream. Closed only after the replacement passed CI and merged. |
Fixes #90.
Problem
src/commandcode-catalog.tsis generated from the bundled Command Code CLI, so a model published upstream after the last sync has no entry inMODEL_REASONINGorMODEL_EFFORTSuntilnpm run sync:commandcode-catalogruns again.deepseek/deepseek-v4.1-flashis in that state, and three things follow from the missing flag:src/core.tsreturns early frommappedReasoningEfforton!model.reasoning, soreasoning_effortis never put on the wireindex.tsderivescompat.supportsReasoningEffort: MODEL_EFFORTS[model.id] !== undefinedfrom the effort listsrc/models.tsbuilds no thinking metadata at all, so Pi offers no thinking levelscommandcode-catalog-overrides.tsonly exposes an efforts hook, so it cannot fix this on its own: efforts without the flag still hit thecore.tsguard.Evidence
Command Code CLI 1.53.0 (
npm pack command-code@1.53.0,dist/cli.mjs):The pinned catalog (generated from
command-code@1.44.0) contains neither the reasoning flag nor an effort list for that id, which is whypi --list-modelsreportsthinking: nofor a model the endpoint acceptsreasoning_effortfor.Change
MODEL_REASONING_OVERRIDESnext to the existing effort overrides, documented the same wayMODEL_REASONINGinsrc/models.ts, mirroring howMODEL_EFFORT_OVERRIDESis merged overMODEL_EFFORTSlow,high,max) fordeepseek/deepseek-v4.1-flashVerification
npm run test:unit(15 suites),npm run typecheckandnpm run format:checkall pass.tests/test-models.tsadds a case for the merge itself. It fails while the override is missing and also fails once the generated catalog ships the flag, so the entry gets dropped rather than silently duplicated.tests/test-stream.tsadds a request-shape case for a catalog-gap model, asserting the field on the emitted body. Reverting the source change fails exactly that case and nothing else.--thinking low|high|maxsendsreasoning_effort: "low"|"high"|"max",--thinking offsends no field, and the responses come back with matching reasoning tokens.Existing tests already cover both hosts, so the new model is included in the pi/OMP metadata assertions (
thinkingLevelMaptristate, effort map, canonical metadata) without extra cases.Not included
Both are the same root cause — the pinned catalog predates the model — but they live in different files and are deliberately left out to keep this PR to one problem:
MODEL_COSTShas no entry for the id, so Pi displays zero cost for it. fix(pricing): add display pricing for muse-spark-1.3 and 1.44.0 models #85/chore: refresh all models from command-code@1.53.0 #86 already touch that block and the pricing fixtures, so I would rather follow up once one of them lands.inputModalities: the CLI declares["text", "image"]whileinputModalitiesForModelfalls back to text-only for unknown ids, so image input would be rejected byassertTextOnlyMessages. Happy to send that separately if wanted.