Dynamic Profiles historyTransform
Parent: Mac local LLMs: Apple Foundation Models and Core AI · Published reference · snapshot 2026-10-05
↓ Facts as markdownall context files
Apple's DynamicProfile page says historyTransform performs stateless transcript transforms that change the transcript sent to the model but not the global transcript state.
These notes link each claim to its source. A source may be a research report hosted on this site rather than the primary document. A published reference means the content is available; it does not certify independent review or accuracy.Read the editorial policy and follow the sources before relying on a claim.
Facts
- Apple's DynamicProfile page says historyTransform performs stateless transcript transforms that change the transcript sent to the model but not the global transcript state. [source]
- Apple's documented example keeps only the last twenty entries: `.historyTransform { history in Array(history.suffix(20)) }`. [source]
- A DynamicProfile body must resolve to a single active Profile; the profile-level modifiers include model, temperature, samplingMode, reasoningLevel, maximumResponseTokens, historyTransform and onResponse. [source]
- Modifier precedence runs: call-site GenerationOptions passed to respond(to:options:), then the modifier closest to the Profile declaration, then outer modifiers. [source]
- Call-site GenerationOptions override only matching generation values and never replace the profile's model, historyTransform or lifecycle callbacks. [source]
- Precedence resolves only conflicts: a historyTransform or maximumResponseTokens with no competing value in the chain applies regardless of modifier order. [source]
- If a profile and an outer modifier both register onResponse, the framework runs both callbacks. [source]
- Reaching maximumResponseTokens stops generation without throwing, which can leave an incomplete sentence or malformed structured output. [source]
- Appending to a transcript usually preserves the KV cache, while removing entries, changing tools or swapping instructions can invalidate it. [source]
- The on-device context window is smaller than Private Cloud Compute's and can be read at runtime from SystemLanguageModel.default.contextSize. [source]
- Switching between a remote and the on-device model stops either model reusing the other's cache. [source]
- A sensible tool-heavy pattern is to drop completed tool interactions as whole units first, then apply a rolling window. [source]
Children
- No children recorded.