Skip to content

epic: Claude API prompt caching compliance #1082

@bug-ops

Description

@bug-ops

Audit of our `ClaudeProvider` against the current Anthropic prompt caching documentation revealed several gaps that reduce or eliminate caching effectiveness.

Child issues

Context

Issue #1079 fixed marker ordering in `rebuild_system_prompt` (PR #1081). This epic tracks remaining compliance gaps found by auditing the current docs.

Recommended fix order

  1. chore(cache): remove outdated anthropic-beta prompt-caching-2024-07-31 header #1085 (remove outdated header) — safe, no behavior change
  2. fix(cache): Block 1 base prompt (~377 tokens) is below minimum cache threshold #1083 (fix token threshold) — restores actual caching
  3. fix(cache): tool definitions lack cache_control — tools invalidate system cache without savings #1084 (cache tool definitions) — additional savings
  4. feat(cache): adopt automatic caching for multi-turn ACP sessions #1086 (automatic caching) — long-term simplification
  5. feat(cache): add message-level cache_control for long ACP conversations #1087 (message caching) — only for very long sessions

Metadata

Metadata

Assignees

No one assigned

    Labels

    epicMilestone-level tracking issuellmzeph-llm crate (Ollama, Claude)

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions