Repository navigation
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
StreamingFuncis now returned (with a nil response). - anthropic: reasoning-only streaming works; a stream error event ends the call;
temperature/top_pare omitted where the model or thinking mode rejects them. - llms:
ToolCallJSON round trips keep the function name and arguments;
wrongly typed fields now return a wrappedjson.UnmarshalTypeError. - llamafile:
WithNandWithMinLengthno longer setn_ctxandmin_p; useWithNCtxandWithMinP. - chains: no longer clear a streaming function set by the caller.
- cohere: invalid input returns an error instead of panicking.
- googleai:
GOOGLE_API_KEYis used only when no other auth option is given.
New
llms.WithWebSearchfor OpenAI (#1454).- Typed reasoning parts:
ThinkingContent,RedactedThinkingContentandContentChoice.Parts. ThinkingConfig.EffortandDisplay(WithThinkingEffort,WithThinkingDisplay),
mapped for Anthropic and OpenAI reasoning models.(*ContentResponse).AssistantMessagefor 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 forllms.Modelimplementations.
Fixes
- anthropic: keep every part of system, AI and tool messages (#1456, #1468, #1010);
acceptredacted_thinkingblocks; replace the retired default model (#1431). - openai: zero-argument tool schemas include
properties(#1446);
reasoning_effortonly for models that accept it; notemperaturefor search-preview models. - googleai: send the API key with
WithHTTPClient; report reasoning support for Gemini 2.5.
New Contributors
- @majiayu000 made their first contribution in #1454
Full Changelog: v0.1.14...v0.1.15