Skip to content

fix(llm): graceful degradation when compact-2026-01-12 beta header is rejected #1698

@bug-ops

Description

@bug-ops

Follow-up from PR #1696 security audit (SEC-COMPACT-03).

Currently, if Anthropic deprecates or rejects the compact-2026-01-12 beta header, all Claude requests with server_compaction=true will return a 400 error with no fallback. The client should:

  1. Detect a 400/invalid beta header response
  2. Automatically disable server_compaction_active for the session
  3. Fall back to client-side compaction
  4. Log a warning so the user knows to update their config

Files: crates/zeph-llm/src/claude.rs, crates/zeph-core/src/agent/

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingllmzeph-llm crate (Ollama, Claude)

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions