---
title: "Untitled"
url: https://memory.wiki/y8kqJM9v
updated: 2026-10-09T20:47:21.752Z
hub: https://memory.wiki/hub/pratofeito
concept_count: 8
source: "desktop"
---
---

title: "Streaming, Multimodal Prompting & Private Cloud Compute" description: "Production patterns for streaming, image attachments, dynamic sessions and PCC." type: article status: stable tags: \[streaming, multimodal, pcc, wwdc26\] sources:

- resource: ../external-sources/apple-foundation-models-docs.md

---

## Streaming

```swift
for try await chunk in session.streamResponse(to: prompt) { /* update UI with PartiallyGenerated */ }
```

Use `isResponding` gate; throttle UI to 60fps; handle `contextSizeExceeded` mid-stream by preserving transcript.

## Multimodal Prompting

```swift
let ref = ImageReference(image: cgImage)
let prompt = Prompt("Describe this chart") + Attachment(image: ref)
```

Combine `ImageAttachmentContent` + text; see [Overview](./apple-foundation-models-overview.md).

## Private Cloud Compute

```swift
let pcc = PrivateCloudComputeLanguageModel()
let session = LanguageModelSession(model: pcc)
```

Larger window, stronger reasoning, privacy-preserving. Entitlement `com.apple.developer.private-cloud-compute`. Fall back to on-device when unavailable.

## Dynamic Sessions

`DynamicProfile`, `Profile`, `SessionProperty` allow runtime tool/instruction composition + `onToolCall` counting for required→allowed transitions.

See [Tool Calling](./apple-foundation-models-tool-calling.md) and [Catalog](./core-ai-model-catalog.md).

---

## Summary
Developers can implement advanced AI features by using streaming responses, multimodal image attachments, and dynamic session management. Private Cloud Compute provides enhanced reasoning and privacy with an automatic fallback to on-device processing.

## Themes
- Production AI patterns
- Multimodal model integration
- Private Cloud Compute
- Dynamic session management

## Key takeaways
- Streaming responses should be handled using an isResponding gate and context preservation during overflow errors.
- Multimodal prompts are constructed by combining text with ImageAttachmentContent via ImageReference.
- Private Cloud Compute requires the com.apple.developer.private-cloud-compute entitlement and should include an on-device fallback mechanism.
- Dynamic sessions support runtime tool and instruction composition using Profile and SessionProperty objects.

## Insights
- Streaming UI performance requires throttling to 60fps to maintain responsiveness during partial generation.
- Dynamic sessions utilize runtime composition to manage transitions between required and allowed tools.
- Private Cloud Compute acts as a privacy-preserving extension for larger context windows and stronger reasoning capabilities.

## Open questions / gaps
- What are the specific criteria or triggers for the fallback mechanism from Private Cloud Compute to on-device models?

## Concepts in this document
- **Private Cloud Compute** _(entity)_
  A privacy-preserving cloud model offering larger context windows and stronger reasoning capabilities.
- **Streaming** _(concept)_
  Pattern for updating UI with partially generated model responses using async streams.
- **Multimodal Prompting** _(concept)_
  Method for combining text prompts with image attachments using ImageReference.
- **Dynamic Sessions** _(concept)_
  Framework for runtime tool and instruction composition using profiles and session properties.
- **Apple Foundation Models** _(tag)_
  The underlying technology suite for streaming, multimodal, and cloud compute features.
- **com.apple.developer.private-cloud-compute** _(tag)_
  Required entitlement for accessing Private Cloud Compute features.
- **On-device fallback** _(decision)_
  System architecture choice to use local models when Private Cloud Compute is unavailable.
- **WWDC26** _(tag)_
  The event context associated with these production patterns.

## Concept relations (within this doc's concepts)
- **Private Cloud Compute** is component of **Apple Foundation Models**
- **Dynamic Sessions** integrates with **Apple Foundation Models**
- **Private Cloud Compute** requires **On-device fallback**
- **Multimodal Prompting** uses framework **Apple Foundation Models**
- **Dynamic Sessions** utilizes **Apple Foundation Models**
- **Multimodal Prompting** part of **Apple Foundation Models**
- **Private Cloud Compute** is part of **Apple Foundation Models**
- **On-device fallback** supports availability of **Private Cloud Compute**
- **Multimodal Prompting** implements **Apple Foundation Models**

_Hub canonical:_ https://memory.wiki/hub/pratofeito
_Concept digest:_ https://memory.wiki/raw/hub/pratofeito?digest=1&compact=1
