Skip to content

v0.3.0

Latest

Choose a tag to compare

@lox lox released this 19 Jul 12:30
· 3 commits to main since this release
e6218f0

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.CallUsage values while preserving aggregate TotalUsage, 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 WithReasoning and WithPreviousResponseID options.
  • Upgraded the OpenAI adapter to openai-go/v3 v3.44.0, restored text and json_object response 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.WithRequestOption must import request options from github.com/openai/openai-go/v3/option.
  • Usage.InputTokens now 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