contextSize
Returns the maximum context size (in tokens) supported by the model.
Declaration
@backDeployed(before: iOS 26.4, macOS 26.4, visionOS 26.4)
final var contextSize: Int { get }Return Value
The maximum number of tokens the model can process in a single context.
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.