feat(provider/anthropic): add support for claude-opus-4-8#15674
Merged
Conversation
5 tasks
gr2m
approved these changes
May 28, 2026
gr2m
pushed a commit
that referenced
this pull request
May 28, 2026
…#15675) ## Summary Manual backport of #15674. ## Checklist <!-- Do not edit this list. Leave items unchecked that don't apply. If you need to track subtasks, create a new "## Tasks" section Please check if the PR fulfills the following requirements: --> - [x] All commits are signed (PRs with unsigned commits cannot be merged) - [x] Tests have been added / updated (for bug fixes / features) - [x] Documentation has been added / updated (for bug fixes / features) - [x] A _patch_ changeset for relevant packages has been added (for bug fixes / features - run `pnpm changeset` in the project root) - [x] I have reviewed this pull request (self-review)
Contributor
|
🚀 Published in:
|
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Background
Anthropic released
claude-opus-4-8, available on the first-party API as well as on Bedrock, Vertex, and the AI Gateway. Opus 4.8 is the first Claude model to support mid-conversationsystemmessages.Summary
claude-opus-4-8(and Bedrock / Vertex / Gateway variants) to provider model ID unions.claude-opus-4-8intogetModelCapabilitieswith the same profile asclaude-opus-4-7(128k output, adaptive thinking, xhigh effort, structured output, sampling parameters rejected).UnsupportedFunctionalityErrorfor "Multiple system messages that are separated by user/assistant messages", since the API will reject unsupported messages anyway. A second system block is now emitted inline inmessagesas{ role: 'system', content: [{ type: 'text', text }] }, and the converter adds themid-conversation-system-2026-04-07beta header automatically. The first system block still flows into the top-levelsystemfield — so existing prompts hit a byte-identical request.mid-conversation-systemexample.Manual Verification
Run the relevant Opus 4.8 examples modified, including the new ones for mid-conversation system message.
Checklist
pnpm changesetin the project root)