---
title: ContextOptions
framework: foundationmodels
role: symbol
role_heading: Structure
path: foundationmodels/contextoptions
---

# ContextOptions

Options that configure details that should appear in the prompt.

## Declaration

```swift
struct ContextOptions
```

## Mentioned in

Adding server-side intelligence with Private Cloud Compute

## Overview

Overview Create a ContextOptions structure when you need to bias the model’s behavior by adjusting how the model receives your prompt.

## Topics

### Creating context options

- [init(includeSchemaInPrompt:reasoningLevel:)](foundationmodels/contextoptions/init(includeschemainprompt:reasoninglevel:).md)

### Configuring the reasoning level

- [reasoningLevel](foundationmodels/contextoptions/reasoninglevel-swift.property.md)
- [ContextOptions.ReasoningLevel](foundationmodels/contextoptions/reasoninglevel-swift.enum.md)

### Including the schema

- [includeSchemaInPrompt](foundationmodels/contextoptions/includeschemainprompt.md)

## Relationships

### Conforms To

- [Equatable](swift/equatable.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Sessions and prompts

- [Prompting an on-device foundation model](foundationmodels/prompting-an-on-device-foundation-model.md)
- [Managing the context window](foundationmodels/managing-the-context-window.md)
- [Updating prompts for new model versions](foundationmodels/updating-prompts-for-new-model-versions.md)
- [LanguageModelSession](foundationmodels/languagemodelsession.md)
- [Instructions](foundationmodels/instructions.md)
- [Prompt](foundationmodels/prompt.md)
- [Transcript](foundationmodels/transcript.md)
- [TranscriptErrorHandlingPolicy](foundationmodels/transcripterrorhandlingpolicy.md)
- [GenerationOptions](foundationmodels/generationoptions.md)
