diff --git a/src/data/languages/languageData.ts b/src/data/languages/languageData.ts index b7bbd5e8a2..e1788fdb19 100644 --- a/src/data/languages/languageData.ts +++ b/src/data/languages/languageData.ts @@ -44,7 +44,7 @@ export default { android: '1.2', }, aiTransport: { - javascript: '0.2', + javascript: '0.3', }, spaces: { javascript: '0.5', diff --git a/src/pages/docs/ai-transport/api/errors.mdx b/src/pages/docs/ai-transport/api/errors.mdx index e3597de0d1..a9b8c7ec58 100644 --- a/src/pages/docs/ai-transport/api/errors.mdx +++ b/src/pages/docs/ai-transport/api/errors.mdx @@ -63,6 +63,7 @@ Auth and channel errors come from the Ably platform, not AI Transport. The most | 40300 | Forbidden. | The token is valid but not authorised for this resource. | | 80000 | Channel attach failed. | Check the channel name and capability. | | 90000 | Internal channel error. | Retry the operation. If the error persists, contact support. | +| 93002 | `Can only update/delete/append messages on channels with mutableMessages enabled`. The namespace lacks the `mutableMessages` rule, so AI Transport cannot append stream tokens. This is the most common AI Transport setup failure. | Enable the **Message annotations, updates, deletes, and appends** rule on the namespace. See [Configure the channel rule](/docs/ai-transport/getting-started/channel-rules). | The full Ably error code list lives at [Ably error codes](/docs/sdks/error-codes). diff --git a/src/pages/docs/ai-transport/frameworks/vercel-ai-sdk-core.mdx b/src/pages/docs/ai-transport/frameworks/vercel-ai-sdk-core.mdx index 841c2bfad2..f5a7b2303a 100644 --- a/src/pages/docs/ai-transport/frameworks/vercel-ai-sdk-core.mdx +++ b/src/pages/docs/ai-transport/frameworks/vercel-ai-sdk-core.mdx @@ -9,6 +9,10 @@ intro: "Vercel AI SDK Core gives you streamText for orchestrating LLMs on the se Ready to build? See [Get started with Vercel AI SDK](/docs/ai-transport/getting-started/vercel-ai-sdk). + + ## What Vercel AI SDK Core brings | Capability | Description | diff --git a/src/pages/docs/ai-transport/frameworks/vercel-ai-sdk-ui.mdx b/src/pages/docs/ai-transport/frameworks/vercel-ai-sdk-ui.mdx index 7571e99ba3..9d06816657 100644 --- a/src/pages/docs/ai-transport/frameworks/vercel-ai-sdk-ui.mdx +++ b/src/pages/docs/ai-transport/frameworks/vercel-ai-sdk-ui.mdx @@ -11,6 +11,10 @@ redirect_from: Ready to build? See [Get started with Vercel AI SDK](/docs/ai-transport/getting-started/vercel-ai-sdk). + + ## What Vercel AI SDK UI brings | Capability | Description | diff --git a/src/pages/docs/ai-transport/getting-started/authentication.mdx b/src/pages/docs/ai-transport/getting-started/authentication.mdx index 90493be7de..a07bc29ffa 100644 --- a/src/pages/docs/ai-transport/getting-started/authentication.mdx +++ b/src/pages/docs/ai-transport/getting-started/authentication.mdx @@ -5,7 +5,11 @@ meta_keywords: "AI Transport, authentication setup, Ably JWT, authCallback, toke intro: "AI Transport authenticates through your existing auth: your server validates the user and signs an Ably token, and the browser's Ably client fetches it through `authCallback`and refreshes it before expiry." --- + + +AI Transport reuses the authentication you already have. Your server validates the user and signs a short-lived Ably JWT, scoped to the channels that user can reach. The browser's Ably client fetches that token through an `authCallback` and refreshes it before it expires, so the connection stays authenticated for the whole conversation. The steps below wire up the server endpoint, the client, and the separate POST that wakes the agent.