feat: read prompt caching cache_ttl from config

- Load prompt_caching.cache_ttl in AIAgent (5m default, 1h opt-in)
- Document DEFAULT_CONFIG and developer guide example
- Add unit tests for default, 1h, and invalid TTL fallback

Made-with: Cursor
This commit is contained in:
WildCat Eng Manager 2026-04-19 13:40:52 -05:00 committed by Teknium
parent 9de555f3e3
commit 7626f3702e
4 changed files with 84 additions and 5 deletions

View file

@ -332,9 +332,9 @@ Prompt caching is automatically enabled when:
- The provider supports `cache_control` (native Anthropic API or OpenRouter)
```yaml
# config.yaml — TTL is configurable
model:
cache_ttl: "5m" # "5m" or "1h"
# config.yaml — TTL is configurable (must be "5m" or "1h")
prompt_caching:
cache_ttl: "5m"
```
The CLI shows caching status at startup: