Skip to content

fix(anthropic): remove stale effort-2025-11-24 beta header#14989

Merged
lgrammel merged 3 commits into
vercel:mainfrom
Mmartinrusso:fix/anthropic-remove-effort-beta-header
May 5, 2026
Merged

fix(anthropic): remove stale effort-2025-11-24 beta header#14989
lgrammel merged 3 commits into
vercel:mainfrom
Mmartinrusso:fix/anthropic-remove-effort-beta-header

Conversation

@Mmartinrusso
Copy link
Copy Markdown
Contributor

@Mmartinrusso Mmartinrusso commented 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

  • All commits are signed (PRs with unsigned commits cannot be merged)
  • Tests have been added / updated (for bug fixes / features)
  • Documentation has been added / updated (for bug fixes / features)
  • A patch changeset for relevant packages has been added (for bug fixes / features - run `pnpm changeset` in the project root)
  • 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.

@lgrammel
Copy link
Copy Markdown
Collaborator

lgrammel commented May 5, 2026

@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

Mmartinrusso and others added 2 commits May 5, 2026 09:53
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>
@Mmartinrusso Mmartinrusso force-pushed the fix/anthropic-remove-effort-beta-header branch from ce42830 to bec5077 Compare May 5, 2026 12:54
@lgrammel
Copy link
Copy Markdown
Collaborator

lgrammel commented May 5, 2026

@Mmartinrusso the signatures need to be verified, see
image

@lgrammel lgrammel added the backport Admins only: add this label to a pull request in order to backport it to the prior version label May 5, 2026
@lgrammel lgrammel merged commit e5c4f40 into vercel:main May 5, 2026
34 of 37 checks passed
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>
@github-actions github-actions Bot removed the backport Admins only: add this label to a pull request in order to backport it to the prior version label May 5, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 5, 2026

✅ 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>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 5, 2026

🚀 Published in:

Package Version
ai 7.0.0-canary.121
@ai-sdk/alibaba 2.0.0-canary.42
@ai-sdk/amazon-bedrock 5.0.0-canary.51
@ai-sdk/angular 3.0.0-canary.121
@ai-sdk/anthropic 4.0.0-canary.46
@ai-sdk/assemblyai 3.0.0-canary.35
@ai-sdk/azure 4.0.0-canary.49
@ai-sdk/baseten 2.0.0-canary.40
@ai-sdk/black-forest-labs 2.0.0-canary.34
@ai-sdk/bytedance 2.0.0-canary.35
@ai-sdk/cerebras 3.0.0-canary.40
@ai-sdk/cohere 4.0.0-canary.36
@ai-sdk/deepgram 3.0.0-canary.34
@ai-sdk/deepinfra 3.0.0-canary.40
@ai-sdk/deepseek 3.0.0-canary.36
@ai-sdk/elevenlabs 3.0.0-canary.34
@ai-sdk/fal 3.0.0-canary.34
@ai-sdk/fireworks 3.0.0-canary.40
@ai-sdk/gateway 4.0.0-canary.71
@ai-sdk/gladia 3.0.0-canary.34
@ai-sdk/google 4.0.0-canary.53
@ai-sdk/google-vertex 5.0.0-canary.72
@ai-sdk/groq 4.0.0-canary.37
@ai-sdk/huggingface 2.0.0-canary.40
@ai-sdk/hume 3.0.0-canary.34
@ai-sdk/klingai 4.0.0-canary.35
@ai-sdk/langchain 3.0.0-canary.121
@ai-sdk/llamaindex 3.0.0-canary.121
@ai-sdk/lmnt 3.0.0-canary.34
@ai-sdk/luma 3.0.0-canary.34
@ai-sdk/mcp 2.0.0-canary.41
@ai-sdk/mistral 4.0.0-canary.38
@ai-sdk/moonshotai 3.0.0-canary.40
@ai-sdk/open-responses 2.0.0-canary.36
@ai-sdk/openai 4.0.0-canary.49
@ai-sdk/openai-compatible 3.0.0-canary.40
@ai-sdk/otel 1.0.0-canary.67
@ai-sdk/perplexity 4.0.0-canary.37
@ai-sdk/prodia 2.0.0-canary.37
@ai-sdk/provider-utils 5.0.0-canary.33
@ai-sdk/react 4.0.0-canary.121
@ai-sdk/replicate 3.0.0-canary.35
@ai-sdk/revai 3.0.0-canary.35
@ai-sdk/rsc 3.0.0-canary.122
@ai-sdk/svelte 5.0.0-canary.121
@ai-sdk/togetherai 3.0.0-canary.40
@ai-sdk/valibot 3.0.0-canary.33
@ai-sdk/vercel 3.0.0-canary.40
@ai-sdk/voyage 1.0.0-canary.7
@ai-sdk/vue 4.0.0-canary.121
@ai-sdk/workflow 1.0.0-canary.36
@ai-sdk/xai 4.0.0-canary.53

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.

fix(provider/anthropic): stop sending obsolete effort-2025-11-24 beta header (rejected by Vertex)

2 participants