Skip to content

fix: stop defaulting reasoning effort per model (1.4.1) - #91

Merged
sf-jin-ku merged 1 commit into
mainfrom
fix/no-per-model-effort-default
Jul 29, 2026
Merged

fix: stop defaulting reasoning effort per model (1.4.1)#91
sf-jin-ku merged 1 commit into
mainfrom
fix/no-per-model-effort-default

Conversation

@sf-jin-ku

Copy link
Copy Markdown
Contributor

Problem

v1.4.0 gave every friendly model alias a high default effort. Two things wrong with that:

  1. It overrode the user's own Claude Code setting. Someone with "effortLevel": "xhigh" in ~/.claude/settings.json silently got high instead, because the plugin always passed --effort.
  2. It duplicated a host-owned catalog. Which effort levels a model supports is Claude Code's business — Haiku 4.5 is not in the reasoning-effort tier at all. A table here would rot exactly like the pinned model IDs that v1.4.0 removed.

Fix

Delete DEFAULT_EFFORT_BY_MODEL / resolveDefaultEffort at the shared boundary, so buildArgs() is the only place that emits the flag. --effort is forwarded only when the user passes it; otherwise Claude Code applies its own default. --model still defaults to opus — defaulting the model is a deliberate product decision, not a duplicated catalog.

Net −91/+86 across 13 files. No new conditionals: buildArgs() already gated on options.effort.

Also fixed

Both resolveModel and resolveEffort return undefined for whitespace-only input, and both were pushed into argv unconditionally. resolveDefaultEffort used to trim that away; removing it exposed --effort " "ERR_INVALID_ARG_TYPE in spawn(). Both flags now gate on the resolved value. Regression test added.

Docs

The first pass claimed "haiku rejects --effort". Backed that out — a smoke test on CLI 2.1.220 showed --model haiku --effort high returning is_error:false, so the CLI does not reject the combination; the effort-tier fact is an API-surface claim. Contracts now assert only what this plugin controls: no plugin-owned per-model default, effort support attributed to Claude Code. tests/skills-contracts.test.mjs was relaxed to match so CI does not pin an unverified claim.

Migration

Users who relied on v1.2.0's opus + xhigh should either pass --effort xhigh explicitly or set effortLevel in their Claude Code settings — the latter now actually takes effect.

Verification

npm run check green: 506 unit / 43 integration / 22 E2E, 0 fail. Lint and typecheck clean.

🤖 Generated with Claude Code

v1.4.0 gave every friendly alias a `high` default effort. That duplicates a
catalog the host CLI owns, exactly like the pinned model IDs that release
removed, and it is wrong for `haiku` — Haiku 4.5 is not in the reasoning-effort
model tier.

Delete `DEFAULT_EFFORT_BY_MODEL` / `resolveDefaultEffort` at the shared
boundary so `buildArgs()` is the only thing that emits the flag. `--model`
still defaults to `opus`; effort is forwarded only when the user asks for it,
and each model keeps whatever Claude Code defaults to.

Also gate `--model` / `--effort` on their resolved values. Both resolvers
return undefined for whitespace-only input, which previously reached spawn()
argv as undefined and threw ERR_INVALID_ARG_TYPE.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@upwind-code-us

upwind-code-us Bot commented Jul 29, 2026

Copy link
Copy Markdown

Upwind Upwind Code Scan - ✅ Proceed with Deployment

0 newly introduced vulnerabilities · 0 resolved · 0 total in this PR vs main

View full analysis in Upwind Console

Scan completed in 19s

Scan history (1 scan)
Commit Scanned at New Resolved Net
32b57d6 < 2026-07-29 08:32 UTC 0 0 0

Last scanned: 32b57d6 · 2026-07-29 08:32 UTC

@upwind-code-us

upwind-code-us Bot commented Jul 29, 2026

Copy link
Copy Markdown

Upwind Upwind IaC Scan - ✅ Proceed with Deployment

0 misconfigurations detected

View full analysis in Upwind Console →

Scan completed in 3s

Scan history (1 scan)
Commit Scanned at New Resolved Net
32b57d6 < 2026-07-29 08:32 UTC 0 0 0

Last scanned: 32b57d6 · 2026-07-29 08:32 UTC

@sf-jin-ku
sf-jin-ku merged commit 77e6fec into main Jul 29, 2026
5 checks passed
@sf-jin-ku
sf-jin-ku deleted the fix/no-per-model-effort-default branch July 29, 2026 08:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant