Skip to content

Conversation

@matt423
Copy link
Member

@matt423 matt423 commented Jan 20, 2026

Description

Follows the structure and content of other message-per-token guides for the Vercel AI SDK.

Review App

Checklist

Summary by CodeRabbit

  • Documentation
    • Added new guide for streaming Vercel AI SDK responses via Ably using the message-per-token pattern
    • Includes publisher and subscriber workflow examples with step-by-step setup and execution instructions
    • Covers multi-publisher and multi-subscriber scenarios with per-response correlation

✏️ Tip: You can customize this high-level summary in your review settings.

@matt423 matt423 self-assigned this Jan 20, 2026
@matt423 matt423 added the review-app Create a Heroku review app label Jan 20, 2026
@coderabbitai
Copy link

coderabbitai bot commented Jan 20, 2026

Important

Review skipped

Auto reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

This PR adds comprehensive documentation for implementing token streaming with the Vercel AI SDK using Ably's message-per-token pattern. It includes navigation updates, a guide tile, and a detailed guide with publisher and subscriber code examples demonstrating real-time response reconstruction.

Changes

Cohort / File(s) Summary
Navigation Entry
src/data/nav/aitransport.ts
Added new navigation item "Vercel AI SDK token streaming - message per token" under Guides, linking to the new documentation page.
Documentation Index
src/pages/docs/ai-transport/index.mdx
Introduced new "Vercel AI SDK" subsection with a Tile component linking to the vercel-message-per-token guide with title, description, and image.
New Guide Documentation
src/pages/docs/guides/ai-transport/vercel-message-per-token.mdx
Added comprehensive guide covering the message-per-token streaming pattern, including Vercel SDK event mapping to Ably messages, publisher workflow with streamText iteration, subscriber workflow with response reconstruction per responseId, multi-publisher/subscriber scenarios, event sequences, and setup guidance.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐰 Hops through streams of tokens bright,
Vercel's SDK shines with Ably's light,
Messages flow per token cascade,
Publishers and subscribers promenade,
Real-time responses, granular and keen,
The finest streaming guide you've seen!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title directly corresponds to the main change: adding documentation for Vercel AI SDK message-per-token streaming guidance as specified in issue AIT-205.
Linked Issues check ✅ Passed The PR successfully delivers the objective from AIT-205: a guide article demonstrating token streaming with Vercel AI SDK, including publisher/subscriber patterns and granular history management.
Out of Scope Changes check ✅ Passed All changes are within scope: adding a new navigation entry, index tile reference, and comprehensive guide documentation specifically for Vercel AI SDK message-per-token streaming as required by AIT-205.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Comment @coderabbitai help to get the list of available commands and usage tips.

@matt423
Copy link
Member Author

matt423 commented Jan 20, 2026

@coderabbitai review

@ably-ci ably-ci temporarily deployed to ably-docs-ait-205-verce-ehkyor January 20, 2026 17:09 Inactive
@coderabbitai
Copy link

coderabbitai bot commented Jan 20, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@matt423 matt423 marked this pull request as ready for review January 20, 2026 17:22
@matt423 matt423 force-pushed the ait-205-vercel-ai-per-token-guide branch from 2bb06e5 to ee3fbf5 Compare January 21, 2026 09:44
@matt423 matt423 temporarily deployed to ably-docs-ait-205-verce-ehkyor January 21, 2026 09:44 Inactive
Copy link
Contributor

@mschristensen mschristensen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, looks good, just a few small comments but approving ahead of those changes.

This guide uses version 5.x of the AI SDK. You can use any model from any [supported provider](https://ai-sdk.dev/providers/ai-sdk-providers) by specifying it as a string (e.g., `'openai/gpt-4o'`, `'anthropic/claude-sonnet-4'`). Some details of interacting with the SDK may differ if using a different major version.
</Aside>

Export your AI provider API key to the environment, which will be used later in the guide by the Vercel AI SDK:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be:

Suggested change
Export your AI provider API key to the environment, which will be used later in the guide by the Vercel AI SDK:
Export your Vercel AI Gateway API key to the environment, which will be used later in the guide by the Vercel AI SDK:

I'm looking at: https://ai-sdk.dev/docs/getting-started/nodejs#configure-vercel-ai-gateway-api-key

@matt423 matt423 force-pushed the ait-205-vercel-ai-per-token-guide branch from ee3fbf5 to 83af465 Compare January 22, 2026 16:25
@matt423 matt423 temporarily deployed to ably-docs-ait-205-verce-ehkyor January 22, 2026 16:26 Inactive
@matt423 matt423 merged commit c6b51ca into main Jan 22, 2026
7 checks passed
@matt423 matt423 deleted the ait-205-vercel-ai-per-token-guide branch January 22, 2026 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review-app Create a Heroku review app

Development

Successfully merging this pull request may close these issues.

4 participants