@cloudflare/ai-chat@0.10.2
cloudflare/agents@cloudflare/ai-chat@0.10.2Aug 18, 2026by github-actions[bot]
AI Summary
Enhances error handling in `useAgentChat` and exposes transport types for framework-agnostic usage.
Key Highlights
- Error frames are now treated as terminal responses
- Exposes `WebSocketChatTransport` from framework-neutral entry point
- Supports AI SDK flexible schemas (Valibot) in `agentTool`
- Zod is no longer a peer requirement
New Features
- Terminal error handling
- WebSocket transport exposure
- Valibot schema support
Full Release Notes
### Patch Changes
- [#2023](https://github.com/cloudflare/agents/pull/2023) [`2b2b598`](https://github.com/cloudflare/agents/commit/2b2b5980e1945cf55f5a11626bc395e7c460516f) Thanks [@threepointone](https://github.com/threepointone)! - Treat `useAgentChat` observer error frames as terminal responses.
Plain-text error bodies are no longer parsed as stream chunks or merged into an empty assistant message. Error frames now clear observer streaming, replay, recovery, and tool-continuation state even when they omit `done`, matching the transport-owned stream behavior.
Existing observer UIs that displayed error bodies as assistant messages must move those diagnostics to a dedicated error surface.
- [#2052](https://github.com/cloudflare/agents/pull/2052) [`f9d71d6`](https://github.com/cloudflare/agents/commit/f9d71d65ffb31cb45c8594b5f3bd4eeb4a8560d1) Thanks [@cjol](https://github.com/cjol)! - Expose `WebSocketChatTransport` and its connection types from the framework-neutral `agents/chat/transport` entry point. React peers are now optional for framework-neutral clients and servers.
Existing users of `agents/chat/react` or `@cloudflare/ai-chat/react` must continue to declare compatible `react` and `@ai-sdk/react` dependencies explicitly.
- [#2091](https://github.com/cloudflare/agents/pull/2091) [`4d2084c`](https://github.com/cloudflare/agents/commit/4d2084c1580395aac7df1f622d5a1f7a8a40beed) Thanks [@cjol](https://github.com/cjol)! - Accept AI SDK flexible schemas in `agentTool`, including Valibot adapters, while preserving schema-driven input inference and structured output validation. Zod is no longer a peer requirement of `@cloudflare/ai-chat`.
Existing custom schemas that no longer type-check as AI SDK `FlexibleSchema` must use the schema library's AI SDK adapter or wrap raw JSON Schema with `jsonSchema()`. Validation-only Standard Schema implementations are insufficient because tool inputs must expose JSON Schema to the model.