Tool schema caching: - Mark the last tool with cache_control:ephemeral before each Anthropic request; Anthropic caches all preceding tools as a prefix - Same for OpenRouter+Claude via openAITool.CacheControl extension Large tool result caching (Anthropic only): - In buildAnthropicMessages, scan backwards through the encoded output and mark the last tool_result block ≥4096 bytes with cache_control - 4096 bytes ≈ 1024 tokens, Anthropic's minimum cache entry size - OpenAI wire format has no block structure for tool results; skip Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| agent | ||
| backend | ||
| config | ||
| env | ||
| log | ||
| paths | ||
| skills | ||
| store | ||
| tools | ||