WWDC26 opens the Foundation Models abstraction. A LanguageModel can back a LanguageModelSession. You care about three conforming types on iOS 27 and macOS 27:
SystemLanguageModelruns on the device. Lowest latency. Smallest window. No network.PrivateCloudComputeLanguageModelruns Apple's larger PCC model. WWDC26 quotes a 32,000 token window and reasoning levels. No API key. Still Apple privacy bounds, not a public LLM vendor.CoreAILanguageModelwraps a model you shipped as Core AI (a baked.aimodel). Use it when the job is yours: a style model from the writing LoRA course, or a catalog LLM you chose on purpose.
import FoundationModels
import CoreAI
// Illustrative. Confirm initializers in the installed SDK.
let system = SystemLanguageModel()
let pcc = PrivateCloudComputeLanguageModel()
// CoreAILanguageModel wraps a baked .aimodel. Confirm the load API in Xcode 27.
let coreAI: CoreAILanguageModel? = nil
MLX and third-party server models exist in the same abstraction. This course leaves them out. EDGE FDE routing here is Apple silicon plus Apple PCC plus your Core AI artifact.
Availability is a real branch. The system model can be unavailable. PCC needs a network path that Apple allows. A Core AI file can be missing from the bundle. The router must see those flags before it picks a winner.
Next, write rules in cost, latency, and quality, not in model marketing names.
Key concepts
LanguageModelbacksLanguageModelSession. Three conforming types matter here.SystemLanguageModelruns on the device. Lowest latency. Smallest window. No network.PrivateCloudComputeLanguageModelruns Apple's larger PCC model. No API key.CoreAILanguageModelwraps a baked.aimodelfor a job you shipped.
Takeaways
- Same session protocol, different back. Dynamic Profiles switch the model with a modifier.
- MLX and third-party servers are out of scope for this course.
- The router must check availability before it picks.