(edited)
Question
Do I need to pass any additional headers to get the 1-million context window in Opus 4.6, similar to what we do for Sonnet 4?
Code Example
import { streamText } from 'ai';import { largePrompt } from './largePrompt.ts';
const result = streamText({ headers: { 'anthropic-beta': 'context-1m-2025-08-07', }, model: 'anthropic/claude-4-sonnet', prompt: `You have a big brain. Summarize into 3 sentences: ${largePrompt}`, providerOptions: { gateway: { only: ['anthropic'] }, },});Pricing
As for the pricing, does it incur any extra cost aside from what is already mentioned on the gateway when using the 1000K context window?