Skip to content

feat: add Claude Opus 4.8 model support#234

Closed
SeaL773 wants to merge 2 commits into
griffinmartin:mainfrom
SeaL773:feat/opus-4-8-support
Closed

feat: add Claude Opus 4.8 model support#234
SeaL773 wants to merge 2 commits into
griffinmartin:mainfrom
SeaL773:feat/opus-4-8-support

Conversation

@SeaL773

@SeaL773 SeaL773 commented May 28, 2026

Copy link
Copy Markdown
Contributor

Summary

Add support for Claude Opus 4.8 (claude-opus-4-8), released by Anthropic on May 28, 2026.

Follows the same pattern as #203 (Opus 4.7 support).

Changes

src/model-config.ts

  • Add "4-8" model override with effort-2025-11-24 beta (matching 4.6/4.7 config)

README.md

  • Add claude-opus-4-8 to supported models table
  • Update model count: 15 → 16

src/betas.test.ts

  • Add claude-opus-4-8 to disableEffort non-haiku test
  • Add claude-opus-4-8 to default no-1M-context test
  • Add 1M context opt-in assertion for opus 4.8
  • Add supports1mContext assertion for opus 4.8

Notes

  • supports1mContext() already handles 4.8 automatically (version comparison ≥ 4.6)
  • transforms.ts and betas.ts require no changes (model-agnostic logic)
  • All existing tests pass locally (npx tsx --test src/betas.test.ts)

References

@SeaL773

SeaL773 commented May 28, 2026

Copy link
Copy Markdown
Contributor Author
image image

@SeaL773

SeaL773 commented May 28, 2026

Copy link
Copy Markdown
Contributor Author

After tracing the request path, I realized this PR has no real functional impact.

Per Anthropic's official docs:

"The effort parameter is available on all supported models with no beta header required."

The effort parameter is GA — no beta header required. With or without this PR, effort control works on Opus 4.8 in both code paths:

  • Without PR: getModelOverride(\"claude-opus-4-8\") returns null → no `effort-2025-11-24` header added, but `effort` stays in the request body (since `disableEffort` is undefined). Request succeeds.
  • With PR: same body, plus the (redundant) `effort-2025-11-24` beta header.

The only difference is one optional beta header that the API doesn't require. The reason Claude Code v2.1.112 still sends it is just that the version predates GA.

Closing this — it's pattern consistency with 4-6/4-7 but doesn't fix or enable anything. Happy to re-open if there's evidence Anthropic checks for this header as a client-fingerprint signal.

@SeaL773 SeaL773 closed this May 28, 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