Skip to content

feat(model): add Claude Opus 4.8 and retire Opus 4.1#89

Open
hakula139 wants to merge 5 commits into
mainfrom
feat/opus-4-8
Open

feat(model): add Claude Opus 4.8 and retire Opus 4.1#89
hakula139 wants to merge 5 commits into
mainfrom
feat/opus-4-8

Conversation

@hakula139
Copy link
Copy Markdown
Owner

@hakula139 hakula139 commented May 29, 2026

Summary

Adds Claude Opus 4.8 as the default model and retires Opus 4.1 from oxide-code's model table.

  • Opus 4.8 ships as the default model and the opus alias target. It shares 4.7's capability set and $5 / $25 pricing, so a single MODELS row wires up betas, pricing, the 1M context window, and the auto-compaction threshold.
  • Effort defaults now track Claude Code per model: a new per-model default_effort gives xhigh on Opus 4.7 and high on Opus 4.8 (the upstream API default), replacing the old highest-non-Max heuristic.
  • Opus 4.1 is removed from the model table, pricing, and tests. The API and status-line research docs keep 4.1 (and the base-4 model columns) because they document upstream behavior, not oxide-code's supported set.

Design decisions

  • One MODELS row drives a model. Betas, pricing, context window, and the auto-compaction threshold all derive from lookup, so 4.8 needed exactly one declarative row.
  • Per-model effort default, not a heuristic. Upstream defaults every effort-capable model to high; Claude Code bumps only 4.7 to xhigh (4.8 rides the high default). The highest-non-Max heuristic couldn't express "4.7 xhigh, 4.8 high", so Capabilities::default_effort stores it explicitly. xhigh stays the recommended pick for coding — set it with /effort.
  • Code drops 4.1; research docs keep it. oxide-code no longer offers 4.1, but docs/research/** mirrors upstream, so the beta matrix and pricing table retain Opus 4.1 and the base-4 columns, using the 4.1+ / 4.5+ shorthand.
  • Picker lists 4.8 in place of 4.7. 4.7 stays fully selectable through the table; only the curated picker roster swaps, mirroring how 4.6 was dropped when 4.7 shipped.

Changes

File Description
model.rs Adds the Opus 4.8 row and a per-model default_effort (xhigh on 4.7, high on 4.8 / 4.6 / Sonnet 4.6), removes the retired Opus 4.1 row + import, and updates the effort / display / absent-family tests.
model/pricing.rs Removes the OPUS_4_1_RATES constant.
config.rs Defaults to claude-opus-4-8[1m]; the resolved default effort is now high (derived max_tokens 32K).
client/anthropic/betas.rs Pins 4.8's beta header set and order to 4.7's.
prompt/environment.rs Adds the 4.8 knowledge-cutoff entry.
slash/model.rs Points the opus alias at 4.8 and updates roster / alias / dated-id tests.
slash/picker.rs Swaps the curated picker roster from 4.7 to 4.8.
slash.rs, tui/components/welcome.rs, tui/components/status.rs, tui/components/snapshots/*.snap Bumps fixture model ids / labels to 4.8 and regenerates snapshots.
docs/guide/configuration.md Documents 4.8 as the default and the per-model effort defaults, and repoints the tier-guide link to the upstream effort doc.
docs/research/api/anthropic.md Rewrites the per-model effort-default note to the real upstream behavior; the beta matrix and structured-outputs allowlist stay upstream-faithful (4.1 + base-4), using the 4.1+ shorthand.
docs/research/tui/status-line.md Keeps the Opus 4.1 pricing row; adopts the Opus 4.5+ shorthand.
docs/design/tui/welcome.md, docs/design/tui/status-line.md Refreshes model-label examples to 4.8.

Test plan

  • cargo fmt --all --check
  • cargo build
  • cargo clippy --all-targets -- -D warnings: zero warnings
  • cargo test: 2094 tests pass
  • cargo llvm-cov: not run (cargo-llvm-cov unavailable in this environment)
  • pnpm lint: 0 errors
  • pnpm spellcheck: 0 issues

hakula139 added 3 commits May 29, 2026 16:50
Opus 4.8 shares 4.7's full capability set (interleaved thinking, context
management, 1M context, the Low..Max effort ladder, structured outputs) and
the same $5/$25 pricing, so a single most-specific-first MODELS row makes it
fully functional: betas, pricing, context window, and the auto-compaction
threshold all derive from the table.

Make it the default model and the `opus` alias target. The combined
model+effort picker lists 4.8 in place of 4.7 (4.7 stays selectable via the
table), mirroring how 4.6 was dropped from the roster when 4.7 shipped.

oxide-code keeps its highest-non-Max effort heuristic, so 4.8 defaults to
xhigh rather than upstream's high default.
Opus 4.1 is no longer a supported model. Remove its MODELS row, the
OPUS_4_1_RATES pricing constant, and the tests that pinned its older
$15/$75 pricing and display labels. `lookup` now treats `claude-opus-4-1`
as a retired family that resolves to nothing, asserted alongside the other
absent ids.

Collapse the Opus 4.1 references in the API and status-line research docs
into the 4.5 tier, which carries the same beta profile and is the lowest
Opus the table still models.
The beta matrix mirrors the families oxide-code's MODELS table actually
sends. Base Opus 4, Sonnet 4, and Haiku 4 resolve to nothing in `lookup`
(asserted by lookup_unknown_or_retired), so their columns documented
profiles the client never emits. The 4.5 vs 4.6+ columns still carry the
tier-gating contrast (effort, context-1m), and the unknown-alias fallback
is already covered in prose.
@hakula139 hakula139 added the enhancement New feature or request label May 29, 2026
@hakula139 hakula139 self-assigned this May 29, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented May 29, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

hakula139 added 2 commits May 29, 2026 17:40
The highest-non-Max heuristic resolved both Opus 4.7 and 4.8 to xhigh, but
upstream defaults every effort-capable model to `high` and Claude Code bumps
only 4.7 to `xhigh` (4.8 rides the `high` default). Replace the heuristic with
an explicit per-model `default_effort` on Capabilities: xhigh on 4.7, high on
4.8 / 4.6 / Sonnet 4.6, none on models without effort. The default model
(Opus 4.8) now resolves to `high`, so derived max_tokens is 32K.
The API and status-line research docs describe upstream rather than
oxide-code's supported set, so restore Opus 4.1 and the base-4 columns in the
beta matrix and pricing table (oxide-code still drops 4.1 from its own model
table). Collapse contiguous version ranges to the `4.1+` / `4.5+` shorthand.

Correct the effort docs: the per-model default note now states the real
upstream default (`high` everywhere, with Claude Code bumping 4.7 to `xhigh`),
the configuration guide's default table matches, and the tier-guide link
points to the effort doc that carries the table instead of a mislabeled
migration-guide link.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant