Files
oai-swift/oAI
rune 5b99a6f81c Add Anthropic prompt caching (direct + via OpenRouter)
Caches the system prompt/tools and growing conversation history via
cache_control breakpoints, cutting cost and latency on repeated turns.
Covers both the regular chat path and the tool-calling loop
(chatWithToolMessages), which has its own request-building code and was
initially missed. Cost calculation now accounts for cache write/read
pricing instead of treating all input tokens as full price. Verified
live: cache reads grow turn-over-turn in oAI.log.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-18 12:43:32 +02:00
..
2026-03-05 13:17:53 +01:00
2026-03-04 10:19:16 +01:00
2026-02-11 22:22:55 +01:00