Skip to main content

Claude Sonnet 4 now supports 1M token context in Vercel AI Gateway

By Steven Van ·

Vercel's AI Gateway adds Claude Sonnet 4's 1M-token context for full codebases and large document sets, with no separate Anthropic account needed.

Vercel's AI Gateway now supports Claude Sonnet 4's 1 million-token context window, with no separate Anthropic account required. The larger context handles bigger inputs, such as full codebases of roughly 75,000 or more lines, or large sets of documents.

To use it with the AI SDK v5, developers set the model to anthropic/claude-4-sonnet and add the anthropic-beta: context-1m-2025-08-07 header. AI Gateway routes the model across multiple providers, including Anthropic and Bedrock, and includes built-in observability, bring-your-own-key support, and automatic retries on failover. Read the announcement.

Vercel
Vercel
The platform for frontend developers — deploy, preview, and scale web apps and AI agents with zero config.
View Vercel →

Original source

Read Claude Sonnet 4 now supports 1M token context in Vercel AI Gateway on Creators Toolbox