fix(anthropic): remove stale effort-2025-11-24 beta header#14989
Merged
lgrammel merged 3 commits intoMay 5, 2026
Conversation
Collaborator
|
@Mmartinrusso thanks. please keep our pr description structure, add a patch changeset, and sign the commits. you can find more information here: https://github.com/vercel/ai/blob/main/CONTRIBUTING.md#submitting-pull-requests |
The effort parameter went GA on 2025-11-24, requiring only the
output_config.effort body field. The anthropic-beta header is now
obsolete and is rejected by Vertex AI's strict validator with 400.
Removes the betas.add('effort-2025-11-24') call, mirroring the
precedent set by vercel#14542 (fine-grained-tool-streaming header removal).
The body-field path already drives the feature end-to-end.
Fixes vercel#14766
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
ce42830 to
bec5077
Compare
Collaborator
|
@Mmartinrusso the signatures need to be verified, see |
lgrammel
approved these changes
May 5, 2026
github-actions Bot
added a commit
that referenced
this pull request
May 5, 2026
## Background
The `effort` parameter for extended thinking went GA on 2025-11-24.
Anthropic published it under a beta flag (`effort-2025-11-24`) during
the preview period, but the flag was retired when the feature shipped.
Direct Anthropic still silently ignores the stale header, but Vertex
AI's strict validator is actively rejecting requests with an HTTP 400:
```
Unexpected value(s) `effort-2025-11-24` for the `anthropic-beta` header.
```
## Summary
Remove the `betas.add('effort-2025-11-24')` call from
`anthropic-language-model.ts`. The `output_config.effort` body field
(already wired) continues to drive the feature end-to-end on direct
Anthropic, Bedrock, and Vertex.
## Manual Verification
Tested by inspecting the serialized request body in the existing test
suite - `output_config.effort` is still present and correct; the
`anthropic-beta` header no longer carries the stale value.
## Checklist
- [x] All commits are signed (PRs with unsigned commits cannot be
merged)
- [x] Tests have been added / updated (for bug fixes / features)
- [ ] 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)
## Related Issues
Fixes #14766
Similar to #14542, which removed the analogous
`fine-grained-tool-streaming-2025-05-14` header when that feature went
GA.
---------
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Lars Grammel <lars.grammel@gmail.com>
Contributor
|
✅ Backport PR created: #15011 |
lgrammel
added a commit
that referenced
this pull request
May 5, 2026
…15011) This is an automated backport of #14989 to the release-v6.0 branch. FYI @Mmartinrusso Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> Co-authored-by: Lars Grammel <lars.grammel@gmail.com>
Contributor
|
🚀 Published in:
|
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
The
effortparameter for extended thinking went GA on 2025-11-24. Anthropic published it under a beta flag (effort-2025-11-24) during the preview period, but the flag was retired when the feature shipped. Direct Anthropic still silently ignores the stale header, but Vertex AI's strict validator is actively rejecting requests with an HTTP 400:Summary
Remove the
betas.add('effort-2025-11-24')call fromanthropic-language-model.ts. Theoutput_config.effortbody field (already wired) continues to drive the feature end-to-end on direct Anthropic, Bedrock, and Vertex.Manual Verification
Tested by inspecting the serialized request body in the existing test suite -
output_config.effortis still present and correct; theanthropic-betaheader no longer carries the stale value.Checklist
Related Issues
Fixes #14766
Similar to #14542, which removed the analogous
fine-grained-tool-streaming-2025-05-14header when that feature went GA.