# Model Context
URL: /docs/api-reference/model-context/context

Provide model instructions, contextual state, and inline renderers to assistant-ui runtimes.

{/* 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]

### mergeModelContexts \[#mergemodelcontexts]

```ts
const mergeModelContexts: (configSet: Set<ModelContextProvider>) => ModelContext;
```

### ModelContextClient \[#modelcontextclient]

```ts
const ModelContextClient: () => ResourceElement<ClientOutput<"modelContext">, undefined>;
```

### ModelContextProvider \[#modelcontextprovider]

<ParametersTable />

### useAssistantContext \[#useassistantcontext]

<ParametersTable />

### useAssistantInstructions \[#useassistantinstructions]

<ParametersTable />

### useInlineRender \[#useinlinerender]

<ParametersTable />

### useThreadModelContext \[#usethreadmodelcontext]

Deprecated: Use `useAuiState((s) => s.thread.modelContext)` instead. See migration guide: [https://assistant-ui.com/docs/migrations/v0-12](https://assistant-ui.com/docs/migrations/v0-12)

<ParametersTable />

{/* api-reference:end */}
