<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: 27.0.0 -",
    "macOS: 27.0.0 -",
    "visionOS: 27.0.0 -",
    "watchOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "FoundationModels",
  "identifier" : "/documentation/FoundationModels/ContextOptions",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Foundation Models"
    ],
    "preciseIdentifier" : "s:16FoundationModels14ContextOptionsV"
  },
  "title" : "ContextOptions"
}
-->

# ContextOptions

Options that configure details that should appear in the prompt.

```
struct ContextOptions
```

## Overview

Create a [`ContextOptions`](/documentation/FoundationModels/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:)`](/documentation/FoundationModels/ContextOptions/init(includeSchemaInPrompt:reasoningLevel:))

Creates options that control how the model is prompted.

### Configuring the reasoning level

[`reasoningLevel`](/documentation/FoundationModels/ContextOptions/reasoningLevel-swift.property)

Controls the amount of reasoning that the model is allowed to output before producing a response.

[`ReasoningLevel`](/documentation/FoundationModels/ContextOptions/ReasoningLevel-swift.enum)

Controls the amount of reasoning that the model is allowed to output before producing a response.

### Including the schema

[`includeSchemaInPrompt`](/documentation/FoundationModels/ContextOptions/includeSchemaInPrompt)

A Boolean value that indicates whether to inject the schema into the prompt to bias the model.

## Relationships

### Conforms To

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`Sendable`](/documentation/Swift/Sendable)

[`Equatable`](/documentation/Swift/Equatable)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)