Skip to content

fix(provider/anthropic): minor follow up to support no-op speed standard#12582

Merged
felixarntz merged 3 commits intomainfrom
fa-fix-claude-fast-mode
Feb 14, 2026
Merged

fix(provider/anthropic): minor follow up to support no-op speed standard#12582
felixarntz merged 3 commits intomainfrom
fa-fix-claude-fast-mode

Conversation

@felixarntz
Copy link
Copy Markdown
Collaborator

Background

Follow-up to #12353 which added speed: 'fast' support for Claude. A few things were missed: 'standard' is also a valid value per the Anthropic spec, the speed field was missing from the API type definitions, and there was no documentation for the feature.

These are low-severity issues, but potentially could lead to problems for those that rely on providerOptions schema and may incorrectly reject the 'standard' value.

Summary

  • Accept 'standard' in addition to 'fast' for the speed provider option (it's a no-op but required by the spec)
  • Add AnthropicSpeed type to the API definitions
  • Add a "Fast Mode" section to the Anthropic provider docs
  • Add test for speed: 'standard' verifying no beta header is sent

Checklist

  • 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

N/A

@vercel-ai-sdk vercel-ai-sdk bot added ai/provider related to a provider package. Must be assigned together with at least one `provider/*` label provider/anthropic Issues related to the @ai-sdk/anthropic provider labels Feb 13, 2026

### Fast Mode

Anthropic supports a `speed` option for `claude-opus-4-6` that enables faster inference with approximately 2.5x faster output token speeds.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could be worth adding a link to https://code.claude.com/docs/en/fast-mode for more info

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed in 31a7219

@felixarntz felixarntz merged commit 23ac4a3 into main Feb 14, 2026
18 checks passed
@felixarntz felixarntz deleted the fa-fix-claude-fast-mode branch February 14, 2026 00:19
@felixarntz felixarntz added the backport Admins only: add this label to a pull request in order to backport it to the prior version label Feb 14, 2026
vercel-ai-sdk bot pushed a commit that referenced this pull request Feb 14, 2026
@vercel-ai-sdk vercel-ai-sdk bot removed the backport Admins only: add this label to a pull request in order to backport it to the prior version label Feb 14, 2026
@vercel-ai-sdk
Copy link
Copy Markdown
Contributor

vercel-ai-sdk bot commented Feb 14, 2026

⚠️ Backport to release-v5.0 created but has conflicts: #12587

felixarntz added a commit that referenced this pull request Feb 16, 2026
…peed standard (#12587)

This is an automated backport of #12582 to the release-v5.0 branch. FYI
@felixarntz
This backport has conflicts that need to be resolved manually.

### `git cherry-pick` output

```
Auto-merging content/providers/01-ai-sdk-providers/05-anthropic.mdx
CONFLICT (content): Merge conflict in content/providers/01-ai-sdk-providers/05-anthropic.mdx
Auto-merging packages/anthropic/src/anthropic-messages-api.ts
Auto-merging packages/anthropic/src/anthropic-messages-language-model.test.ts
Auto-merging packages/anthropic/src/anthropic-messages-language-model.ts
Auto-merging packages/anthropic/src/anthropic-messages-options.ts
error: could not apply 23ac4a3... fix(provider/anthropic): minor follow up to support no-op speed standard (#12582)
hint: After resolving the conflicts, mark them with
hint: "git add/rm <pathspec>", then run
hint: "git cherry-pick --continue".
hint: You can instead skip this commit with "git cherry-pick --skip".
hint: To abort and get back to the state before "git cherry-pick",
hint: run "git cherry-pick --abort".
hint: Disable this message with "git config set advice.mergeConflict false"
```

---------

Co-authored-by: Felix Arntz <felix.arntz@vercel.com>
gr2m pushed a commit that referenced this pull request Feb 16, 2026
…ard (#12582)

## Background

Follow-up to #12353 which added `speed: 'fast'` support for Claude. A
few things were missed: `'standard'` is also a valid value per the
Anthropic spec, the `speed` field was missing from the API type
definitions, and there was no documentation for the feature.

These are low-severity issues, but potentially could lead to problems
for those that rely on `providerOptions` schema and may incorrectly
reject the `'standard'` value.

## Summary

- Accept `'standard'` in addition to `'fast'` for the `speed` provider
option (it's a no-op but required by the spec)
- Add `AnthropicSpeed` type to the API definitions
- Add a "Fast Mode" section to the Anthropic provider docs
- Add test for `speed: 'standard'` verifying no beta header is sent

## Checklist

- [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)

## Related Issues

N/A
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai/provider related to a provider package. Must be assigned together with at least one `provider/*` label provider/anthropic Issues related to the @ai-sdk/anthropic provider

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants