Skip to main content

model_supports_1m

Function model_supports_1m 

Source
pub fn model_supports_1m(model: &str) -> bool
Expand description

Returns true for models that support opting into the 1M context window via the context-1m-2025-08-07 beta header.

Without that header, all current Claude models operate at the default 200k window — including those documented as “1M tokens”, because the extended window is gated behind the beta opt-in. This matches Anthropic’s own claude-code logic (modelSupports1M in src/utils/context.ts).