Skip to content

feat(app): opus 4.8[1m] picker entry + per-model effort gating#1373

Open
jlixfeld wants to merge 2 commits into
slopus:mainfrom
jlixfeld:feat/claude-model-effort
Open

feat(app): opus 4.8[1m] picker entry + per-model effort gating#1373
jlixfeld wants to merge 2 commits into
slopus:mainfrom
jlixfeld:feat/claude-model-effort

Conversation

@jlixfeld

@jlixfeld jlixfeld commented Jun 9, 2026

Copy link
Copy Markdown

Stacked on #1372 (Fable 5). Until that merges, this PR's diff includes the Fable 5 commit; rebase after #1372 lands.

What

Two Claude model-picker improvements:

1. claude-opus-4-8[1m] picker entry

Adds the 1M-context Opus 4.8 variant as a distinct, selectable entry in both the happy-app Claude fallback (opus 4.8 (1M)) and the codium Anthropic plugin. No short alias exists, so the full model id is sent and passed through to the API unchanged.

2. Per-model effort gating

getEffortLevelsForModel previously ignored the model and returned the full Claude effort set for every model — offering levels the API rejects. Per the Anthropic effort docs:

Model low med high xhigh max
Fable 5 / Opus 4.8 (+1M) / Opus 4.7
Sonnet 4.6 / Opus 4.6
Opus 4.5
Haiku 4.5

This fixes a latent bug: the picker offered xhigh/max for Haiku (effort errors entirely on Haiku) and xhigh for Sonnet 4.6 (unsupported). Unknown/custom gateway models keep the full set (support can't be inferred). Matching handles both picker aliases (opus/sonnet) and full model ids from gateway/SDK metadata.

Verification

  • modelModeOptions.test.ts — 11 passed (new model-list + per-model effort matrix tests)
  • happy-app typecheck — pass
  • codium typecheck — pass

Smoke-tested live in the running app via the dev/session-composer picker:

opus 4.8 (1M) entry present:

opus 4.8 (1M)

Fable 5 offers xhigh (full effort set):

fable 5 xhigh

Haiku 4.5 hides the effort control entirely (no effort param):

haiku no effort

Sonnet 4.6 was confirmed to cycle low/medium/high/max with no xhigh.

The relabel-to-4.8 (#1345) and xhigh effort level (#1269) work this builds on is already in main via #1363.

🤖 Generated with Claude Code

Jason Lixfeld and others added 2 commits June 9, 2026 14:53
Anthropic released Claude Fable 5 (`claude-fable-5`) as a GA model on
2026-06-09 — a Mythos-class, most-capable model for long-horizon agentic
work (1M context, adaptive thinking always-on, no extended thinking).

Expose it in both Claude model pickers:
- codium Anthropic plugin: add `claude-fable-5` (full-ID list).
- happy-app Claude fallback: add `claude-fable-5` to getClaudeModelModes.
  Fable 5 is a new family with no short alias (unlike opus/sonnet/haiku),
  so the picker sends the full model id; the Claude CLI passes it through
  to the API unchanged. The live model list still comes from the CLI's
  session metadata when present — this is the offline fallback.

Add a getClaudeModelModes test asserting the fallback list and that the
full id is used for Fable 5.

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
Two related model-picker improvements for Claude:

1. Expose `claude-opus-4-8[1m]` (the 1M-context Opus 4.8 variant) as a
   distinct picker entry in both the happy-app Claude fallback and the
   codium Anthropic plugin. It has no short alias, so the full model id is
   sent and passed through to the API unchanged.

2. Gate effort levels per model. Previously getEffortLevelsForModel ignored
   the model and returned the full claude set for every model — which offers
   levels the API rejects (effort errors entirely on Haiku 4.5; `xhigh` is
   Opus 4.7+/Fable only; `max` is not on Opus 4.5). Per the Anthropic effort
   docs:
     - Fable 5 / Opus 4.8 (+ 1M) / Opus 4.7: low, medium, high, xhigh, max
     - Sonnet 4.6 / Opus 4.6:                low, medium, high, max
     - Opus 4.5:                             low, medium, high
     - Haiku 4.5:                            none
   Unknown/custom (gateway) models keep the full set since support can't be
   inferred. Matching works for both picker aliases (`opus`/`sonnet`) and
   full model ids from gateway/SDK metadata.

Add tests covering the new model list and the per-model effort matrix.

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
jlixfeld added a commit to jlixfeld/happy that referenced this pull request Jun 9, 2026
jlixfeld added a commit to jlixfeld/happy that referenced this pull request Jun 9, 2026
jlixfeld added a commit to jlixfeld/happy that referenced this pull request Jun 9, 2026
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