feat(readme): document provider prompt caching behavior and SmartAI cache integration
This commit is contained in:
@@ -7,6 +7,12 @@
|
||||
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
- document provider prompt caching behavior and SmartAI cache integration (readme)
|
||||
- Adds provider prompt caching to the feature list in the README
|
||||
- Clarifies that provider-specific cache metadata is centralized in @push.rocks/smartai
|
||||
|
||||
## 2026-05-15 - 3.5.0
|
||||
|
||||
### Features
|
||||
|
||||
@@ -76,6 +76,7 @@ console.log(result.usage); // { inputTokens, outputTokens, totalTokens, cacheR
|
||||
- ⚡ **Parallel tool execution** — multiple tool calls in a single step are executed concurrently
|
||||
- 🔧 **Auto-retry with backoff** — handles 429/529/503 errors with header-aware retry delays
|
||||
- 🩹 **Tool call repair** — case-insensitive name matching + invalid tool sink prevents crashes
|
||||
- 💰 **Provider prompt caching** — uses SmartAI cache helpers for Anthropic breakpoints and OpenAI cache affinity
|
||||
- 📊 **Token and reasoning streaming** — `onToken`, `onReasoning*`, and `onToolCall` callbacks for real-time progress
|
||||
- 💥 **Context overflow handling** — detects overflow and invokes your `onContextOverflow` callback
|
||||
|
||||
@@ -168,6 +169,7 @@ const saved = result.toolCalls.some((call) =>
|
||||
|
||||
SmartAgent enables prompt-cache defaults by default:
|
||||
|
||||
- Cache behavior is provided by `@push.rocks/smartai`, so provider-specific cache metadata stays centralized there.
|
||||
- Anthropic-compatible models get cache breakpoints on the first two system messages and the two most recent non-system messages.
|
||||
- OpenAI models get `store: false` by default and, when `sessionId` is provided, `promptCacheKey: sessionId` with `promptCacheRetention: 'in_memory'`.
|
||||
- Longer retention is opt-in. Use `cache: { retention: '24h' }` for OpenAI or `cache: { retention: '1h' }` for Anthropic.
|
||||
|
||||
Reference in New Issue
Block a user