Skip to content

v0.21.0: Merge kanzo-ui main (v0.20.0) into feat/one-ai-deadline

Choose a tag to compare

@angel-ip angel-ip released this 02 Oct 13:09
· 611 commits to main since this release

@kanzo-tech/llm, @kanzo-tech/ai

AiError moves to @kanzo-tech/llm, and createGateway is what ends a silent model. Every
streaming request a gateway model makes — Assist's, Chat's, your own streamText or agent —
now has its headers due within 30 s and each chunk within 30 s of the last; past that the request
is aborted and fails with an AiError whose code is "ai/silent" and whose data.after is
30000. A request that does not stream is not cut, and your own abortSignal still aborts as an
abort. Assist no longer runs a 30 s timer of its own, so a model that does not come from
createGateway is no longer cut by it.

@kanzo-tech/ai no longer exports AiError. Import it from @kanzo-tech/llm:

- import { AiError } from "@kanzo-tech/ai";
+ import { AiError } from "@kanzo-tech/llm";

If you wrapped the fetch you pass to createGateway with a deadline of your own for model
streams, remove it: two timers on one wait race to name the failure.

@kanzo-tech/ai

Assist asks once. A field's request to the model is no longer retried when it fails, so
onFailure receives the first attempt's own error — a gateway's 504 as an APICallError with its
status and body — immediately, instead of the same request repeated twice more with backoff and a
RetryError around it.