feat(models): move manual reasoning efforts into a catalog override

PR #69 added efforts for meta/muse-spark-* directly to the generated
catalog, which the drift check flags and the daily sync job reverts.

Keep src/commandcode-catalog.ts byte-identical to upstream and merge a
separate src/commandcode-catalog-overrides.ts over it at load time. A
test fails as soon as upstream publishes efforts for an overridden model
so the override gets removed instead of shadowing the CLI catalog.

Verified against the live endpoint: pi --thinking xhigh sends
reasoning_effort="xhigh" for meta/muse-spark-1.2-contributor and the
request succeeds; --thinking off sends none.

Closes #69
This commit is contained in:
Patrick Wozniak
2026-09-02 00:03:45 +02:00
parent df4f4a6eef
commit d3c9832d28
7 changed files with 61 additions and 7 deletions
+23
View File
@@ -0,0 +1,23 @@
import type { CommandCodeReasoningEffort } from "./commandcode-catalog.ts"
/**
* Manual reasoning-effort policy for models the official CLI marks as
* reasoning-capable without publishing selectable efforts.
*
* `src/commandcode-catalog.ts` is generated from the CLI package and must stay
* byte-identical to upstream so the daily drift check works. Entries here are
* merged over the generated catalog at load time and are not touched by
* `npm run sync:commandcode-catalog`.
*
* Add a model only when the effort parameter is known to be accepted by the
* Command Code endpoint; remove it once the CLI catalog ships its own efforts.
*/
export const MODEL_EFFORT_OVERRIDES: Readonly<
Record<string, readonly CommandCodeReasoningEffort[]>
> = {
// Meta Muse Spark: the CLI ships no effort levels, but the endpoint accepts
// `reasoning_effort` for these models and other hosts expose the same set.
"meta/muse-spark-1.1": ["minimal", "low", "medium", "high", "xhigh"],
"meta/muse-spark-1.2": ["minimal", "low", "medium", "high", "xhigh"],
"meta/muse-spark-1.2-contributor": ["minimal", "low", "medium", "high", "xhigh"],
}