Skip to content

Activate prompt caching for Claude and xAI agents - #93

Merged
gitcommit90 merged 1 commit into
mainfrom
agent/20260902-022723-claude-xai-prompt-cache
Sep 2, 2026
Merged

Activate prompt caching for Claude and xAI agents#93
gitcommit90 merged 1 commit into
mainfrom
agent/20260902-022723-claude-xai-prompt-cache

Conversation

@gitcommit90

Copy link
Copy Markdown
Owner

Summary

  • add Anthropic cache_control breakpoints only for direct Claude models
  • retain one stable conversation breakpoint plus a rolling three-tool-result frontier so growing agent loops reuse the preceding prefix
  • add a stable, thread-scoped prompt_cache_key only for direct xAI models
  • leave Bedrock, custom, OpenRouter, NVIDIA, and all other providers untouched

Verification

  • exact request-shaping tests pass through the pinned ReRouted Claude and xAI adapters
  • standalone live-provider probe using the exact candidate helper, outside live 1Helm:
    • Claude: create 15,687; next round read 15,687 + create 1,593; third round read 17,280 + create 1,591
    • xAI: 128 cached on first call, then 6,784 cached on calls 2 and 3 of 6,803 prompt tokens
  • typecheck passed
  • build passed
  • focused provider/routing/architecture tests passed
  • autonomy platform 25/25 passed
  • full local suite reached browser tests; browser-only tests are unavailable in this resident container because Chromium lacks libglib-2.0.so.0, so hosted Source CI is the authoritative broad proof

Live 1Helm was not modified or restarted.

@coderabbitai

coderabbitai Bot commented Sep 2, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Team

Run ID: 16598cd3-66cc-4ca6-9890-22d68cf33428


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@gitcommit90
gitcommit90 merged commit b688b6b into main Sep 2, 2026
3 checks passed
@gitcommit90
gitcommit90 deleted the agent/20260902-022723-claude-xai-prompt-cache branch September 2, 2026 02:55
@gitcommit90 gitcommit90 mentioned this pull request Sep 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant