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
Contributor

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


### 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
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
Contributor 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
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 label Feb 14, 2026
@vercel-ai-sdk
Copy link
Contributor

vercel-ai-sdk bot commented Feb 14, 2026

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

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants