This repository has been archived on 2026-08-16 . You can view files and clone it, but cannot push or open issues or pull requests.
Levi Neely
efac665ffe
core: tool schema caching and large tool result caching
...
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>
2026-04-28 12:22:45 +02:00
..
anthropic.go
core: tool schema caching and large tool result caching
2026-04-28 12:22:45 +02:00
anthropic_stream_test.go
core: Anthropic prompt caching and cache-aware cost accounting
2026-04-28 12:01:14 +02:00
backend.go
core: Anthropic prompt caching and cache-aware cost accounting
2026-04-28 12:01:14 +02:00
backend_test.go
agent: retry on transient backend errors and mid-stream drops
2026-04-27 17:54:27 +02:00
codewhisperer.go
kiro: implement social token refresh via desktop.kiro.dev
2026-04-26 18:11:21 +02:00
codewhisperer_internal.go
kiro: implement social token refresh via desktop.kiro.dev
2026-04-26 18:11:21 +02:00
copilot.go
backend: extract stream parsers, shared HTTP, url.URL, comprehensive tests
2026-04-21 15:32:03 +02:00
new.go
backend: require OLLIE_BACKEND/OLLIE_MODEL; no silent ollama default
2026-04-26 18:25:39 +02:00
new_test.go
backend: require OLLIE_BACKEND/OLLIE_MODEL; no silent ollama default
2026-04-26 18:25:39 +02:00
ollama.go
backend: remove unreachable NewRequestWithContext guards (URL validated in ctor)
2026-04-21 15:47:34 +02:00
ollama_stream_test.go
backend: extract parseOllamaContextLength, 100% coverage
2026-04-21 15:39:52 +02:00
openai.go
core: tool schema caching and large tool result caching
2026-04-28 12:22:45 +02:00
openai_encode_test.go
core: cache system prompt on OpenRouter+Claude via content block encoding
2026-04-28 12:14:46 +02:00
openai_stream_test.go
backend: extract stream parsers, shared HTTP, url.URL, comprehensive tests
2026-04-21 15:32:03 +02:00
openai_test.go
backend: extract stream parsers, shared HTTP, url.URL, comprehensive tests
2026-04-21 15:32:03 +02:00
testhelper_test.go
backend: extract stream parsers, shared HTTP, url.URL, comprehensive tests
2026-04-21 15:32:03 +02:00