Platforms to show: All Mac Windows Linux Cross-Platform

LanguageModelSessionsMBS class

Type Topic Plugin Version macOS Windows Linux iOS Targets
class Foundation Models MBS Swift Plugin 25.5 ✅ Yes ❌ No ❌ No ✅ Yes All
An object that represents a session that interacts with a language model.

A session is a single context that you use to generate content with, and maintains state between requests. You can reuse the existing instance or create a new one each time you call the model. When you create a session you can provide instructions that tells the model what its role is and provides guidance on how to respond.

The framework records each call to the model in a Transcript that includes all prompts and responses. If your session exceeds the available context size, you receive an error.

Requires macOS 26, iOS 26 or newer.

This class has no sub classes.

Blog Entries

Release notes

Some related classes:


The items on this page are in the following plugins: MBS Swift Plugin.


LAContextMBS   -   LargeBinaryStreamMBS


The biggest plugin in space...