---
title: contextSize
framework: foundationmodels
role: symbol
role_heading: Instance Property
path: foundationmodels/privatecloudcomputelanguagemodel/contextsize
---

# contextSize

Returns the maximum context size (in tokens) supported by the model.

## Declaration

```swift
nonisolated(nonsending) final var contextSize: Int { get async throws }
```

## Discussion

Discussion The context size represents the total number of tokens that can be used in a single session, including both input prompts and generated responses.
