Repository navigation
This release adds provider-neutral reasoning and continuation controls, preserves usage per model call, and moves the OpenAI adapter onto the current SDK.
Highlights
- Added ordered
Result.CallUsagevalues while preserving aggregateTotalUsage, so callers can apply per-response pricing and long-context rules correctly. - Split ordinary input, cache reads, cache writes, and Anthropic 5-minute and 1-hour cache creation into explicit usage categories.
- Added provider-neutral
WithReasoningandWithPreviousResponseIDoptions. - Upgraded the OpenAI adapter to
openai-go/v3v3.44.0, restoredtextandjson_objectresponse formats, and added opt-in strict function tools without rewriting schemas. - Normalized empty OpenAI function-call arguments to
{}, so no-argument tools always receive valid JSON. - Preserved prompt cache keys, reasoning controls, response continuation, and cache usage across multi-step OpenAI and Anthropic runs.
Upgrade notes
- Callers using
openai.WithRequestOptionmust import request options fromgithub.com/openai/openai-go/v3/option. Usage.InputTokensnow means ordinary uncached input when a provider reports separate cache categories. Pricing code should use the cache-read and cache-creation fields rather than treating input as an inclusive total.
Full changelog: v0.2.1...v0.3.0