AI SDK
@generative-a11y/ai-sdk
Turn documented AI SDK useChat state and callbacks into generative-a11y events.
Public APIs used
AI SDK adapters read documented messages, status, and error state. onFinish and onError report final response state.
| Surface | Exports | Use |
|---|---|---|
| Framework-neutral | createObserver, composeChatCallbacks | Custom subscription or state bridge |
| React | useChatAccessibility, useObserveChatAccessibility | AI SDK useChat components |
| Metadata | CHAT_ADAPTER_METADATA | Supported events and framework APIs |
Runtime and app ownership
Your app owns the core runtime. Adapters report events without running chat actions or reading rendered messages and private AI SDK fields.
scopeIdseparates response and message IDs across chat instances.- Tool arguments do not mean that execution started.
- Your onFinish and onError callbacks remain intact.
- Disposing the observer clears only records created by the adapter.