On iOS 27 and macOS 27, LanguageModelSession accepts a model. The default is the on-device system model. Pass PrivateCloudComputeLanguageModel() when you want Apple's server model on Private Cloud Compute.
import FoundationModels
let onDevice = LanguageModelSession()
let pcc = LanguageModelSession(model: PrivateCloudComputeLanguageModel())
Confirm availability before you show the feature. PCC needs a network and an Apple Intelligence device. If the network fails, retry on the device. Check availability on the model. Do not assume PCC is free of delay. The first token now includes a round trip.
Apple's WWDC26 Private Cloud Compute session reports a larger context window on the server model (32K) and a smaller window on the device. A long transcript that is fine on PCC can stall or fail on-device. Trim history before you switch down. Dynamic Profiles can do that with historyTransform. Switching a profile can also invalidate the KV cache and raise TTFT. Measure after every switch.
Keep one log schema for both models. Same four numbers. Add a field for the model you used. A product owner can then see that PCC bought quality or context, and what it cost in first-token wait.
Read Version prompts like product copy when you route a short on-device profile and a longer PCC profile from one registry.
Next, confirm the same numbers in Instruments.
Key concepts
- The default session is on-device. Pass
PrivateCloudComputeLanguageModel()for PCC. - Check availability before you show the feature. Retry on-device if the network fails.
- PCC first token includes a round trip. The server model has a larger context.
- A profile switch can invalidate the KV cache and raise TTFT.
Takeaways
- Never compare PCC total time to on-device TTFT.
- Use one log schema for both models with a model-used field.
- PCC buys quality or context at a first-token cost.