Skip to content

feat(llm): add --extended-context CLI flag for Claude 1M context window#1748

Merged
bug-ops merged 4 commits intomainfrom
feat-llm-add-extended-context
Mar 14, 2026
Merged

feat(llm): add --extended-context CLI flag for Claude 1M context window#1748
bug-ops merged 4 commits intomainfrom
feat-llm-add-extended-context

Conversation

@bug-ops
Copy link
Owner

@bug-ops bug-ops commented Mar 14, 2026

Closes #1685

Summary

  • Add --extended-context boolean CLI flag to src/cli.rs (follows --server-compaction pattern)
  • In src/runner.rs: when flag is set, override llm.cloud.enable_extended_context = true at runtime and emit tracing::warn cost warning before build_provider()
  • Fix copy-paste doc error in docs/src/guides/cloud-provider.md (wrong flag name in 1M context section)
  • CHANGELOG entry under [Unreleased] ### Added

Usage

zeph --extended-context  # enables 1M context window for this session

Test plan

  • cargo +nightly fmt --check passes
  • cargo clippy --workspace --features full -- -D warnings passes
  • cargo nextest run --config-file .github/nextest.toml --workspace --features full --lib --bins — 5429 passed (+2 new tests for flag parsing)
  • zeph --extended-context emits cost warning and uses 1M context window
  • zeph (no flag) defaults to false, no warning emitted

bug-ops added 2 commits March 14, 2026 14:53
Add `--extended-context` boolean flag to the CLI that overrides
`llm.cloud.enable_extended_context = true` for the current session.
Emits a tracing::warn cost warning when the flag is active.

Follows the existing --server-compaction pattern exactly.

Closes #1685
@github-actions github-actions bot added documentation Improvements or additions to documentation enhancement New feature or request size/S Small PR (11-50 lines) labels Mar 14, 2026
@bug-ops bug-ops enabled auto-merge (squash) March 14, 2026 14:04
@bug-ops bug-ops merged commit 6d0a057 into main Mar 14, 2026
19 checks passed
@bug-ops bug-ops deleted the feat-llm-add-extended-context branch March 14, 2026 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request size/S Small PR (11-50 lines)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(llm): add --extended-context CLI flag for Claude 1M context window

1 participant