
Rsc Streaming Ui
Vercel AI SDK (`ai` npm package) · Vercel AI SDK
AI SDK — Vercel AI SDK
Vercel AI SDK evals — RSC Streaming & UI Generation (relift v3 InfraRed)
About Vercel AI SDK
Vercel AI SDK is the open-source TypeScript-first AI framework from Vercel — the `ai` npm package. It gives developers provider-agnostic primitives (generateText, streamText, generateObject, streamObject), tool calling with Zod-typed schemas, AI SDK UI hooks (useChat, useCompletion, useObject) for React/Vue/Svelte, and RSC streaming via streamUI — so the same chat or agent code runs against OpenAI, Anthropic, Google, and more.
Sample tests· showing 3 of 9
| # | Input | Expected behavior | Check |
|---|---|---|---|
| 01 | Operator's RSC streamUI tool `getWeather.generate` returns a plain object `{ temp: 72 }`. The page never renders the weather card. | In streamUI, each tool's `generate` (async generator or function) must yield and/or return a React node, not raw data. Wrap data in a server component (`<WeatherCard data={...} />`). The streamed result is then a React tree the client can render via useUIState. | Pass / FailAi Platformhigh |
| 02 | streamUI tool `getInvoice.generate` is an async generator that yields a spinner first then returns the final InvoiceCard. The UI never shows the spinner. | In streamUI tool generate, yield a loading React node first, then `return` the final node when data is ready. The yielded value renders immediately and the returned value replaces it. Use an async generator (yield + return), not a plain async function (which only resolves once). | Pass / FailAi Platformmedium |
| 03 | streamUI tool returns `<ClientChart data={dbRow} />` where dbRow contains a secret token field; the secret leaks to the browser bundle. | Sanitize server-side data before passing into a client component — only serializable, non-secret fields cross the RSC boundary. Better: keep rendering inside a server component (no `use client`) so the secret never serializes; render only the safe view on the client. | Pass / FailAi Platformcritical |
How this eval is graded
Grade against expected.ideal_behavior and expected.rubric. Per-criterion pass requires mean >= 4.0 and no criterion below 3.
Rubric criteria
- Vercel Ai Sdk
- Ai Platform
- Rsc Streaming Ui
Recommended for
Works with
Related evals
Run this eval in your workspace
Connect your data, configure thresholds, and review results with your team.