Skip to content

1.15.0

Latest

Choose a tag to compare

@mozex mozex released this 06 Nov 10:43
· 1 commit to main since this release
Immutable release. Only release title and notes can be modified.
f3917d3

What's Changed

  • A Messages stream gives its text as it arrives with text(), and the whole message it adds up to with finalMessage(), the same CreateResponse that create() returns. finalText(), currentMessage() and callbacks per event kind (onEvent(), onText(), onThinking(), onContentBlock(), onMessage()) come with them, and all of it works on fake streams.
  • MessageAccumulator folds stream events you read another way into the message they add up to.
  • RefusalFallbackMiddleware falls back on streamed requests too: a refused stream goes on with the next model's events spliced onto it, behind a fallback block, under one message_start.
  • The middleware takes every fallback block out of the history you send back, where it used to take only those at the front of a turn.
  • CreateResponse::$stop_reason is nullable, for a message folded from a stream before its message_delta.

UPGRADING.md lists the changes that can affect code written against 1.14, such as the nullable stop_reason and a subclass of the Messages StreamResponse that declares one of its new methods.

Full Changelog: 1.14.0...1.15.0