Skip to content

1.3.0

Latest

Choose a tag to compare

@mattt mattt released this 10 Nov 12:29
Immutable release. Only release title and notes can be modified.
194d948

Important

The tool calls that a model makes in one round now run at the same time, on every provider, as they can in Foundation Models. A tool that isn't safe to run alongside others should serialize its own work. Delegate decisions and didExecuteToolCall still happen in the model's order, and results keep that order (#375).

This release adds ToolExecutionDelegate.pendingMessages(in:), which lets a delegate add messages between tool rounds, for example to steer a long response while it runs. The default adds nothing, and these messages don't reset the tool-round limit. SystemLanguageModel doesn't ask, because Foundation Models runs its own tool loop (#376).

It also fixes how transcripts replay. When a turn with a stopped tool call is replayed, each call with no result now gets the output "The tool call was not executed.", so the next request no longer sends a call without a result, which OpenAI and Anthropic reject; the saved transcript doesn't change (#408). Anthropic now gets a tool round's text before that round's tool calls, where it used to come after the tool result (#405). With thinking on, GeminiLanguageModel leaves thought parts out of the response text and out of replayed text (#410). OpenResponsesLanguageModel sends a tool output as text instead of a JSON-encoded content block (#411).

A cancelled respond on MLXLanguageModel and LlamaLanguageModel now throws CancellationError instead of returning the cut-off text, and doesn't add it to the transcript (#409). The HTTP respond loops check for cancellation before each request (#412).

For LiteRT-LM models on iOS and macOS, the README now links anylanguagemodel-litert-lm, a community package by @john-rocky with a LanguageModel conformance (#406).

Thanks to @gtokman for concurrent tool calls (#375) and messages between tool rounds (#376), and to @voropaevv for the Anthropic replay fix (#405).

What's Changed

  • Run a round's tool calls at once in every provider by @gtokman in #375
  • Let a tool delegate add messages between tool rounds by @gtokman in #376
  • Link the LiteRT-LM community package from the README by @mattt in #406
  • Stop a streamed tool test from depending on call order by @mattt in #407
  • Preserve Anthropic tool round text when replaying transcripts by @voropaevv in #405
  • Send an output for each stopped tool call on replay by @mattt in #408
  • Throw CancellationError when a local respond is cancelled by @mattt in #409
  • Leave Gemini thought parts out of the answer and replay by @mattt in #410
  • Send Open Responses tool output as text by @mattt in #411
  • Check for cancellation before each request in HTTP respond loops by @mattt in #412
  • Bump README install snippets to 1.3.0 by @mattt in #413

New Contributors

Full Changelog: 1.2.0...1.3.0