📄 ai-sdk/docs/reference/ai-sdk-rsc/render

File: render.md | Updated: 11/15/2025

Source: https://ai-sdk.dev/docs/reference/ai-sdk-rsc/render

AI SDK

Menu

v5 (Latest)

AI SDK 5.x

AI SDK by Vercel

AI SDK 6 Beta

Foundations

Overview

Providers and Models

Prompts

Tools

Streaming

Getting Started

Navigating the Library

Next.js App Router

Next.js Pages Router

Svelte

Vue.js (Nuxt)

Node.js

Expo

Agents

Agents

Building Agents

Workflow Patterns

Loop Control

AI SDK Core

Overview

Generating Text

Generating Structured Data

Tool Calling

Model Context Protocol (MCP) Tools

Prompt Engineering

Settings

Embeddings

Image Generation

Transcription

Speech

Language Model Middleware

Provider & Model Management

Error Handling

Testing

Telemetry

AI SDK UI

Overview

Chatbot

Chatbot Message Persistence

Chatbot Resume Streams

Chatbot Tool Usage

Generative User Interfaces

Completion

Object Generation

Streaming Custom Data

Error Handling

Transport

Reading UIMessage Streams

Message Metadata

Stream Protocols

AI SDK RSC

Advanced

Reference

AI SDK Core

AI SDK UI

AI SDK RSC

streamUI

createAI

createStreamableUI

createStreamableValue

readStreamableValue

getAIState

getMutableAIState

useAIState

useActions

useUIState

useStreamableValue

render (Removed)

Stream Helpers

AI SDK Errors

Migration Guides

Troubleshooting

Copy markdown

render (Removed)

=========================================================================================

"render" has been removed in AI SDK 4.0.

AI SDK RSC is currently experimental. We recommend using AI SDK UI for production. For guidance on migrating from RSC to UI, see our migration guide .

A helper function to create a streamable UI from LLM providers. This function is similar to AI SDK Core APIs and supports the same model interfaces.

Note: render has been deprecated in favor of streamUI . During migration, please ensure that the messages parameter follows the updated specification .

Import


import { render } from "@ai-sdk/rsc"

API Signature


Parameters

model:

string

Model identifier, must be OpenAI SDK compatible.

provider:

provider client

Currently the only provider available is OpenAI. This needs to match the model name.

initial?:

ReactNode

The initial UI to render.

messages:

Array<SystemMessage | UserMessage | AssistantMessage | ToolMessage>

A list of messages that represent a conversation.

SystemMessage

role:

'system'

The role for the system message.

content:

string

The content of the message.

UserMessage

role:

'user'

The role for the user message.

content:

string

The content of the message.

AssistantMessage

role:

'assistant'

The role for the assistant message.

content:

string

The content of the message.

tool_calls:

ToolCall[]

A list of tool calls made by the model.

ToolCall

id:

string

The id of the tool call.

type:

'function'

The type of the tool call.

function:

Function

The function to call.

Function

name:

string

The name of the function.

arguments:

string

The arguments of the function.

ToolMessage

role:

'tool'

The role for the tool message.

content:

string

The content of the message.

toolCallId:

string

The id of the tool call.

functions?:

ToolSet

Tools that are accessible to and can be called by the model.

Tool

description?:

string

Information about the purpose of the tool including details on how and when it can be used by the model.

parameters:

zod schema

The typed schema that describes the parameters of the tool that can also be used to validation and error handling.

render?:

async (parameters) => any

An async function that is called with the arguments from the tool call and produces a result.

tools?:

ToolSet

Tools that are accessible to and can be called by the model.

Tool

description?:

string

Information about the purpose of the tool including details on how and when it can be used by the model.

parameters:

zod schema

The typed schema that describes the parameters of the tool that can also be used to validation and error handling.

render?:

async (parameters) => any

An async function that is called with the arguments from the tool call and produces a result.

text?:

(Text) => ReactNode

Callback to handle the generated tokens from the model.

Text

content:

string

The full content of the completion.

delta:

string

The delta.

done:

boolean

Is it done?

temperature?:

number

The temperature to use for the model.

Returns

It can return any valid ReactNode.

On this page

render (Removed)

Import

API Signature

Parameters

Returns

Deploy and Scale AI Apps with Vercel.

Vercel delivers the infrastructure and developer experience you need to ship reliable AI-powered applications at scale.

Trusted by industry leaders:

  • OpenAI
  • Photoroom
  • leonardo-ai Logoleonardo-ai Logo
  • zapier Logozapier Logo

Talk to an expert