Skip to content

v0.1.15

Latest

Choose a tag to compare

@tmc tmc released this 05 Oct 05:35
· 17 commits to main since this release
v0.1.15
ec6243f

A patch release that replaces three retired default models, adds typed
reasoning content and OpenAI web search, and fixes a number of provider bugs.

Action required

googleai, vertex: default embedding model is now gemini-embedding-001.
embedding-001 now returns 404. The new model produces 3072-dimension
vectors that are not comparable with the old ones, so indexes built with the
old default must be re-embedded (and fixed-size vector columns resized).

googleai, vertex: default chat model is now gemini-2.5-flash.
gemini-2.0-flash is retired. Gemini 2.5 thinks by default and thinking
counts toward WithMaxTokens; a very small budget can produce no output,
which now returns ErrNoContentInResponse instead of panicking.
Multi-turn tool calling with Gemini 3 is not yet supported (it needs thought
signatures); that is planned for the next release.

anthropic: default model is now claude-sonnet-4-6.
claude-3-5-sonnet-20240620 is retired. Clients that set a model are
unaffected.

Unkeyed struct literals. No exported API was removed, but
llms.ThinkingConfig, llms.ContentChoice, llms.CallOptions and
googleai.Options gained fields, so unkeyed literals of them no longer
compile. Use keyed fields. ContentChoice JSON now includes a Parts key.

Behavior changes

  • bedrock (Nova): text blocks are joined into one choice instead of one choice per block.
  • mistral: non-streaming tool calls stay on the choice that made them, not Choices[0].
  • googleai: an error from StreamingFunc is now returned (with a nil response).
  • anthropic: reasoning-only streaming works; a stream error event ends the call;
    temperature/top_p are omitted where the model or thinking mode rejects them.
  • llms: ToolCall JSON round trips keep the function name and arguments;
    wrongly typed fields now return a wrapped json.UnmarshalTypeError.
  • llamafile: WithN and WithMinLength no longer set n_ctx and min_p; use WithNCtx and WithMinP.
  • chains: no longer clear a streaming function set by the caller.
  • cohere: invalid input returns an error instead of panicking.
  • googleai: GOOGLE_API_KEY is used only when no other auth option is given.

New

  • llms.WithWebSearch for OpenAI (#1454).
  • Typed reasoning parts: ThinkingContent, RedactedThinkingContent and ContentChoice.Parts.
  • ThinkingConfig.Effort and Display (WithThinkingEffort, WithThinkingDisplay),
    mapped for Anthropic and OpenAI reasoning models.
  • (*ContentResponse).AssistantMessage for building the next turn of a tool loop.
  • anthropic: preserves thinking and multi-part messages across turns; supports claude-fable-5.
  • testing/llmtest.TestModel, a conformance check for llms.Model implementations.

Fixes

  • anthropic: keep every part of system, AI and tool messages (#1456, #1468, #1010);
    accept redacted_thinking blocks; replace the retired default model (#1431).
  • openai: zero-argument tool schemas include properties (#1446);
    reasoning_effort only for models that accept it; no temperature for search-preview models.
  • googleai: send the API key with WithHTTPClient; report reasoning support for Gemini 2.5.

New Contributors

Full Changelog: v0.1.14...v0.1.15