-
Notifications
You must be signed in to change notification settings - Fork 2
feat(llm): support Claude 1M token context window beta header #1649
Description
Source
Claude Models Overview — Anthropic docs
Finding
Claude Opus 4.6 and Sonnet 4.6 support a 1M token context window via beta header anthropic-beta: context-1m-2025-08-07. Long context pricing applies above 200K tokens. Useful for large codebase analysis, document processing, and long-running agent sessions.
Applicability
Zeph's Claude provider (crates/zeph-llm/src/claude.rs) currently uses the standard 200K context. Adding an opt-in config option allows users to enable the extended window for code indexing and multi-session workloads:
[llm.claude]
enable_extended_context = true # sends context-1m-2025-08-07 beta headerThe zeph-index use case (large codebase repo map injection) and graph memory recall are the primary beneficiaries. Long context pricing should be documented in the config.
Note: Zeph's own compaction pipeline should not fire before the extended limit is reached when this beta is enabled — context_budget_tokens in config should be respected above 200K.
Priority
Medium — immediately useful for zeph-index and large codebase workflows; pricing increase is opt-in.