# @assistant-ui/react-ai-sdk
URL: /docs/api-reference/integrations/react-ai-sdk

Vercel AI SDK runtime hooks, chat transports, and message conversion utilities for assistant-ui React applications.

{/* AUTO-GENERATED PAGE by scripts/generate-api-reference.mts */}

{/* Do not edit manually. */}

{/* api-reference:start */}

{/* AUTO-GENERATED by scripts/generate-api-reference.mts */}

{/* Do not edit this block manually. */}

## API Reference \[#api-reference]

### AssistantChatTransport \[#assistantchattransport]

<ParametersTable />

### createResumableSessionStorage \[#createresumablesessionstorage]

`sessionStorage`-backed storage for the pending resumable stream id.

<ParametersTable />

### frontendTools \[#frontendtools]

```ts
const frontendTools: (tools: Record<string, { description?: string; parameters: JSONSchema7; }>) => ToolSet;
```

### getThreadMessageTokenUsage \[#getthreadmessagetokenusage]

<ParametersTable />

### injectQuoteContext \[#injectquotecontext]

Injects quote context into messages as markdown blockquotes.

Use this in your route handler before `convertToModelMessages` so the LLM
sees the quoted text that the user is referring to.

<ParametersTable />

### RESUMABLE\_STREAM\_ID\_HEADER \[#resumable\_stream\_id\_header]

```ts
const RESUMABLE_STREAM_ID_HEADER: "x-resumable-stream-id";
```

### useAISDKRuntime \[#useaisdkruntime]

<ParametersTable />

### useChatRuntime \[#usechatruntime]

<ParametersTable />

### useThreadTokenUsage \[#usethreadtokenusage]

```ts
function useThreadTokenUsage(): ThreadTokenUsage;
```

{/* api-reference:end */}
