Foundation Models

RSS for tag

Discuss the Foundation Models framework which provides access to Apple’s on-device large language model that powers Apple Intelligence to help you perform intelligent tasks specific to your app.

Foundation Models Documentation

Posts under Foundation Models subtopic

Post

Replies

Boosts

Views

Activity

Spotlight semantic index & entity schemas — privacy and dynamic/remote content
Entity schemas add app content to the Spotlight semantic index so Siri can find information inside apps. Is the semantic index built and stored entirely on-device, or is any indexed entity content transmitted to Apple or to Private Cloud Compute for embedding/retrieval? How should developers index content that does not live on the device — data that resides on a remote server or is fetched on demand? Is there a provider/just-in-time pattern, or must entities be materialized locally first? What is the freshness/update latency of the index when entities change frequently, and what are the practical limits on entity count and update rate before indexing is throttled? What controls exist to exclude sensitive entities from the semantic index or from Siri's personal-context reach, on a per-entity or per-field basis? How is indexed app content scoped per user/account on shared or multi-account devices, and is it cleared on sign-out?
0
0
58
1w
Clarifying the "Weight List"
In the WWDC26 AI Group Lab, it was mentioned as a 'spoiler alert' that the 'weight list applies only to Siri' and not to the Private Cloud Compute (PCC) language model . Could you clarify if there is a technical path for a developer’s custom adapter—running via the Language Model Protocol—to ever be added to this weight list to handle system-originated Siri requests?
0
0
24
1w
App Intents — exposing conversational and agentic actions to Siri AI
App Intents now connect app content and actions to Apple Intelligence, and Siri AI can take action directly inside third-party apps without fixed trigger phrases. Can an app expose a single conversational/agent-style entry point to Siri AI, or must all capabilities be modeled as discrete intents? If discrete, how does Siri AI chain multiple intents to fulfill a compound natural-language request? What is the supported pattern for long-running or asynchronous intents — actions that acknowledge immediately but complete and return a result seconds or minutes later? Is there a progress/continuation/callback model? How are an intent's results rendered — inline in the Siri app, via a snippet/App Intent UI, or by deep-linking into the app? What control do developers have over that presentation? For intents whose parameters are ambiguous, what disambiguation and follow-up affordances does Siri AI provide, and can developers supply candidate resolutions dynamically at runtime? Is there an eligibility or review process for apps to participate in systemwide Siri AI actions, beyond simply adopting App Intents?
0
0
27
1w
On-device model capabilities, limits, and versioning
What is the context window of the on-device model (AFM 3 Core Advanced and the 3B Core), and how should developers handle prompts that exceed it — automatic truncation, error, or developer-managed chunking? For guided/structured generation into typed Swift values, what are the limits on schema complexity (nesting depth, enums, arrays, optionals), and what is the failure mode when the model cannot satisfy the schema? How deterministic and reliable is on-device tool calling under the Tool protocol — are there guarantees on argument validity, and a recommended pattern for validating/repairing tool arguments before execution? For the new image input: what are the constraints on resolution, image count per prompt, and formats, and does passing images change which device tiers or which model (on-device vs PCC) services the request? Since the on-device model ships and updates with the OS, how should developers detect the active model version at runtime and guard against behavioral drift between OS releases? Is there a pinning or capability-query API? What are the realistic latency and concurrency expectations on supported hardware, and is there a supported way to run multiple sessions or background inference without thermal/throttling penalties?
2
0
50
1w
Foundation Models framework — the unified API for third-party cloud providers
The 2026 framework lets apps call cloud models like Claude and Gemini (or "any provider that conforms to Apple's Language Model protocol") through the same Swift API as the on-device model. What exactly must a provider implement to conform to the Language Model protocol, and can developers register a custom/self-hosted endpoint and their own API keys, or is routing limited to an Apple-curated provider list? Does the unified API normalize provider-specific capabilities — tool/function calling formats, system-prompt handling, streaming tokens, JSON/structured output, multi-turn state — or do these degrade to a lowest common denominator across providers? When a request is routed to a third-party cloud model, what is the data path and privacy boundary? Does it transit Private Cloud Compute, or go direct to the provider, and what is disclosed to the user about where their prompt is processed? If an app supplies a conforming provider, does that provider become selectable by Siri AI for system actions, or is custom-provider routing confined to in-app LanguageModelSession use only? With the framework slated to open-source this summer, will the provider/protocol surface be stable enough to build against now, or should developers expect breaking changes between the beta and the open-source release?
1
0
91
1w
Guidance Around PCC
If a developer is eligible for Private Cloud Compute and then crosses the threshold, what happens to PCC calls? Is there a paid program for PCC that you fall back on or does a developer need to already have built into their app another model ready in the wings to take over once that threshold is reached?
4
1
86
1w
Dynamic profile switching
When using Dynamic Profiles to switch between the on-device model and Private Cloud Compute mid-session, how is the context window reconciled — if I build up context on PCC (larger window) and then route a turn back to the on-device model, what happens to the entries that exceed the on-device window? — Divya Ravi, Senior iOS Engineer
1
0
78
1w
Approaching Custom VST GUI Automation: Combining local Vision OCR with the new FoundationModels framework for screen-grounding
Hello everyone, I’m working on a project to automate software controls inside non-standard macOS applications—specifically custom-drawn audio plugins (like the Roland TR-909 VST). The Challenge: These VST interfaces do not expose their buttons, knobs, or dials via the standard macOS Accessibility tree (NSAccessibility / event taps). Because they are custom-rendered, standard automation tools are blind to them. My Current Hybrid Approach: I am combining two of Apple's local machine learning technologies to solve this without sending data to the cloud: Step 1: Text-Based Layout Mapping (Vision Framework) I capture a screenshot of the targeted window using Quartz Window Services and run a local VNRecognizeTextRequest to extract coordinates for all text labels. This works exceptionally well for text buttons like "OPTION" or "ABOUT". Step 2: Contextual & Non-Text Element Interpretation (FoundationModels Framework) For controls that lack text labels (such as blank step sequencer buttons, parameter knobs, or toggle light states), I pass the screenshot as an Attachment into the new local LanguageModelSession. I ask the model to ground coordinates relative to the text landmarks mapped in Step 1. Here is a simplified snippet of how I am feeding the visual context into the local model: import Foundation import FoundationModels import Cocoa func analyzePluginInterface(cgImage: CGImage) async { guard SystemLanguageModel.default.isAvailable else { print("Local model not downloaded or available.") return } let instructions = """ You are a screen-aware assistant. Your job is to locate GUI controls on a custom 1024x802 VST window. """ let session = LanguageModelSession(instructions: instructions) do { let response = try await session.respond { "Look at this screenshot of the VST window." Attachment(cgImage) "Locate the blank step-sequencer buttons located below the instrument channel labels." "What are the center coordinates (X, Y) for the first active step?" } print("Model Grounding Output: \(response.content)") } catch { print("Inference failed: \(error)") } } My Questions for the Community: Performance & Latency: The local LanguageModelSession.respond call takes several seconds to run on device. For real-time DAW automation, this is a bottleneck. Has anyone experimented with using a custom LoRA adapter or a smaller model profile to speed up spatial coordinate inference? Coordinate Stability: Multimodal models can sometimes hallucinate coordinates (bounding box values). What strategies are you using to constrain the model output to precise pixel boundaries on varying display scaling configurations (Retina vs non-Retina)? Alternative Solutions: Are there newer on-device vision APIs (perhaps in CoreML or Vision) that are better suited for bounding-box grounding of abstract graphics (like dials/knobs) than a general language model session? Would love to hear how others are approaching screen-aware GUI interpretation with these new frameworks! Thanks!
0
0
46
1w
Siri to be interoperable with Copilot’s version control systems
Thank the elders for their knowledge and teachings. Is there a consensus regarding Siri’s utilization for the Agentic and/ or Copilot version control systems. For example the Copilot within, Edge Browser, the stand alone App, the Xbox copilot, and the M365 copilot App. Does the team have a standardized approach for the’start’ feature that can be prompted whilst utilizing Copilot’s build and generate capabilities? Thank you all and best regards.
1
0
22
1w
Foundation Model Variation within the same iOS different hardware.
We understand that on-device Foundation Models (FMs) can evolve between OS releases. To help us accurately scope our application capabilities and performance expectations for multiplatform development, could you clarify the variation of these new on-device models across different hardware? Specifically: Within the same OS & device family: Do the architecture, parameters, or capabilities of the on-device models vary based on hardware tiers (e.g., iPhone vs. iPhone Pro, or MacBook Air M5 vs. MacBook Pro with M5 Pro)? Across different device form factors: Are there model variations between hardware families running equivalent OS releases (e.g., Mac vs. iPhone)? Knowing if we are targeting a uniform model baseline or a tiered model ecosystem will greatly help us optimise our App Intelligence features or at least set us with proper expectations in scope and capabilities. Thanks.
2
0
105
1w
SpotlightSearchTool arguments: description vs. JSON Schema mismatch → “Failed to parse generated content”
Using SpotlightSearchTool with a custom LanguageModel backend (Apple’s ChatCompletionsLanguageModel from foundation-models-utilities, pointed at an OpenAI-compatible server), every tool call fails with ToolCallError → "Failed to parse generated content." The model follows the tool’s documented "Call format" and emits { root, modelComposition, … }. But the generated parameters schema (FullArguments) requires { "query": { "type": "search", "value": { root, modelComposition, … } } }. Query is a QueryType union and a search must be wrapped in DiscriminatedSearch. Wrapping the args manually makes it parse and search correctly. So the description omits the query + type:"search" envelope the schema demands, which makes the tool uninvokable by any model that follows the documentation (it presumably works only with the on-device model trained on the real format). Is this a known issue / intended? Anyone gotten SpotlightSearchTool working with a non-Apple model? Secondary: CoreSpotlightSource.fetchAttributes seems to have no effect on returned attributes. kMDItemDescription only comes back when the in-query fetchAttributes requests it. Bug or expected?
1
0
65
1w
Use different model in foundation model
Hi everyone, I’m working with the WWDC26 Foundation Models framework and would like to know how to precisely control which model is used. Specifically: On-Device: How can I force SystemLanguageModel() to use AFM 3 Core Advanced (the 20B sparse multimodal variant) instead of automatically falling back to the 3B Core? Is there an API to query or explicitly specify the on-device model variant? Private Cloud Compute (PCC): When using PrivateCloudComputeLanguageModel(), how can I ensure it uses AFM 3 Cloud Pro instead of the regular Cloud model? Does setting ContextOptions.reasoningLevel = .deep guarantee the Pro model, or is it still determined automatically by the backend? So far I can only check model.capabilities, but there’s no clear way to confirm which exact model variant is actually running. Are there more granular APIs, DynamicProfile modifiers, or Instruments methods to achieve precise control? Any insights, official documentation, or WWDC session references would be greatly appreciated!
1
0
141
1w
PrivateCloudComputeLanguageModel fails to respond
I am trying out the new PrivateCloudComputeLanguageModel but can't get it to work. When I call session.respond it throws the following error: Error Domain=FoundationModels.LanguageModelError Code=-1 "The operation couldn’t be completed. (FoundationModels.LanguageModelError error -1.)" UserInfo={NSMultipleUnderlyingErrorsKey=( "Error Domain=FoundationModels.LanguageModelError Code=-1 \"(null)\" UserInfo={NSMultipleUnderlyingErrorsKey=(\n \"Error Domain=ModelManagerServices.ModelManagerError Code=1046 \\\"(null)\\\" UserInfo={NSMultipleUnderlyingErrorsKey=(\\n)}\"\n)}" ), NSLocalizedDescription=The operation couldn’t be completed. (FoundationModels.LanguageModelError error -1.)} Maybe error code 1046 means something, but I can't find a mention of it in the docs. My set-up: macOS Golden Gate on a MacBook Pro M1 Xcode 27.0.0 beta 1, calling the model as part of a test on a iPhone 17 simulator with iOS 27 beta 1. I do have the Private Cloud Compute entitlement (removing it triggers a fatalError). model.isAvailable returns true. I tried logging into iCloud on both the macOS host as well as the simulator, but no difference. Relevant code: calling the model: https://github.com/Thomvis/Construct/blob/feature/foundation-models/Sources/MechMuse/FoundationModels.swift#L20 the test to run to trigger the issue: https://github.com/Thomvis/Construct/blob/feature/foundation-models/App/UnitTests/DescribeCombatantsEvaluation.swift#L78
2
0
152
1w
How to obtain more value out of a generic "FoundationModels.LanguageModelError error -1"
I created a tiny sample: provided a session with a tiny tool to tell the date and time to the model. Asked the model to stream response to "What time is it" and just get this error: The operation couldn’t be completed. (FoundationModels.LanguageModelError error -1.) There is no relevant output on Xcode console. And profiling with the new Foundation Models instrument brings zero more insight into the issue. I know it could be many things, but it there may be more information the tools could surface in debug?
4
0
74
1w
Cannot pattern match LanguageModelError from a response stream
The LanguageModelSession.GenerationErrors seems to be deprecated in favor of LanguageModelError for the most part. Now... when iterating through the ResponseStream<String> of a LanguageModelSession.streamResponse(to:options:), with a good old for await, the async iterator .next() can throws. Leaving aside that it is not very conspicuous at the call site it will throw... in the do/catch, the error thrown does not see to be able to be pattern matched to the new LanguageModelError with something like catch let error as LanguageModelError. It was able to patten match the GenerationErrors before just fine, so may be an oversight/bug?
3
0
87
1w
Adapter Training Toolkit: updated version for OS 27?
Hi all, We use Apple Foundation Models in our apps with custom LoRA adapters. Since each adapter is tied to a specific system model version, adapters have to be retrained whenever the base model changes. The toolkit version page currently lists 26.0.0 as the latest, noted as the last release for the OS 26 line. Is there an updated version of the Adapter Training Toolkit available, or expected to be posted, for the OS 27 system model? Just trying to confirm the current status so we can plan accordingly. Thanks.
1
0
87
1w
Spotlight semantic index & entity schemas — privacy and dynamic/remote content
Entity schemas add app content to the Spotlight semantic index so Siri can find information inside apps. Is the semantic index built and stored entirely on-device, or is any indexed entity content transmitted to Apple or to Private Cloud Compute for embedding/retrieval? How should developers index content that does not live on the device — data that resides on a remote server or is fetched on demand? Is there a provider/just-in-time pattern, or must entities be materialized locally first? What is the freshness/update latency of the index when entities change frequently, and what are the practical limits on entity count and update rate before indexing is throttled? What controls exist to exclude sensitive entities from the semantic index or from Siri's personal-context reach, on a per-entity or per-field basis? How is indexed app content scoped per user/account on shared or multi-account devices, and is it cleared on sign-out?
Replies
0
Boosts
0
Views
58
Activity
1w
Clarifying the "Weight List"
In the WWDC26 AI Group Lab, it was mentioned as a 'spoiler alert' that the 'weight list applies only to Siri' and not to the Private Cloud Compute (PCC) language model . Could you clarify if there is a technical path for a developer’s custom adapter—running via the Language Model Protocol—to ever be added to this weight list to handle system-originated Siri requests?
Replies
0
Boosts
0
Views
24
Activity
1w
App Intents — exposing conversational and agentic actions to Siri AI
App Intents now connect app content and actions to Apple Intelligence, and Siri AI can take action directly inside third-party apps without fixed trigger phrases. Can an app expose a single conversational/agent-style entry point to Siri AI, or must all capabilities be modeled as discrete intents? If discrete, how does Siri AI chain multiple intents to fulfill a compound natural-language request? What is the supported pattern for long-running or asynchronous intents — actions that acknowledge immediately but complete and return a result seconds or minutes later? Is there a progress/continuation/callback model? How are an intent's results rendered — inline in the Siri app, via a snippet/App Intent UI, or by deep-linking into the app? What control do developers have over that presentation? For intents whose parameters are ambiguous, what disambiguation and follow-up affordances does Siri AI provide, and can developers supply candidate resolutions dynamically at runtime? Is there an eligibility or review process for apps to participate in systemwide Siri AI actions, beyond simply adopting App Intents?
Replies
0
Boosts
0
Views
27
Activity
1w
On-device model capabilities, limits, and versioning
What is the context window of the on-device model (AFM 3 Core Advanced and the 3B Core), and how should developers handle prompts that exceed it — automatic truncation, error, or developer-managed chunking? For guided/structured generation into typed Swift values, what are the limits on schema complexity (nesting depth, enums, arrays, optionals), and what is the failure mode when the model cannot satisfy the schema? How deterministic and reliable is on-device tool calling under the Tool protocol — are there guarantees on argument validity, and a recommended pattern for validating/repairing tool arguments before execution? For the new image input: what are the constraints on resolution, image count per prompt, and formats, and does passing images change which device tiers or which model (on-device vs PCC) services the request? Since the on-device model ships and updates with the OS, how should developers detect the active model version at runtime and guard against behavioral drift between OS releases? Is there a pinning or capability-query API? What are the realistic latency and concurrency expectations on supported hardware, and is there a supported way to run multiple sessions or background inference without thermal/throttling penalties?
Replies
2
Boosts
0
Views
50
Activity
1w
Foundation Models framework — the unified API for third-party cloud providers
The 2026 framework lets apps call cloud models like Claude and Gemini (or "any provider that conforms to Apple's Language Model protocol") through the same Swift API as the on-device model. What exactly must a provider implement to conform to the Language Model protocol, and can developers register a custom/self-hosted endpoint and their own API keys, or is routing limited to an Apple-curated provider list? Does the unified API normalize provider-specific capabilities — tool/function calling formats, system-prompt handling, streaming tokens, JSON/structured output, multi-turn state — or do these degrade to a lowest common denominator across providers? When a request is routed to a third-party cloud model, what is the data path and privacy boundary? Does it transit Private Cloud Compute, or go direct to the provider, and what is disclosed to the user about where their prompt is processed? If an app supplies a conforming provider, does that provider become selectable by Siri AI for system actions, or is custom-provider routing confined to in-app LanguageModelSession use only? With the framework slated to open-source this summer, will the provider/protocol surface be stable enough to build against now, or should developers expect breaking changes between the beta and the open-source release?
Replies
1
Boosts
0
Views
91
Activity
1w
Guidance Around PCC
If a developer is eligible for Private Cloud Compute and then crosses the threshold, what happens to PCC calls? Is there a paid program for PCC that you fall back on or does a developer need to already have built into their app another model ready in the wings to take over once that threshold is reached?
Replies
4
Boosts
1
Views
86
Activity
1w
What is _the_ proper way to intercept tool calls modify them or dynamically approve/reject them?
What is the proper way to intercept tool calls modify them or dynamically approve/reject them?
Replies
4
Boosts
0
Views
151
Activity
1w
Dynamic profile switching
When using Dynamic Profiles to switch between the on-device model and Private Cloud Compute mid-session, how is the context window reconciled — if I build up context on PCC (larger window) and then route a turn back to the on-device model, what happens to the entries that exceed the on-device window? — Divya Ravi, Senior iOS Engineer
Replies
1
Boosts
0
Views
78
Activity
1w
Using FoundationModels framework in Extensions
LLMs are renowned for using so much RAM. Does this mean we can't essentially use FoundationModels in extensions such as MessageFilterExtension? I assume the system kills the extension before we even get a response.
Replies
2
Boosts
0
Views
80
Activity
1w
Approaching Custom VST GUI Automation: Combining local Vision OCR with the new FoundationModels framework for screen-grounding
Hello everyone, I’m working on a project to automate software controls inside non-standard macOS applications—specifically custom-drawn audio plugins (like the Roland TR-909 VST). The Challenge: These VST interfaces do not expose their buttons, knobs, or dials via the standard macOS Accessibility tree (NSAccessibility / event taps). Because they are custom-rendered, standard automation tools are blind to them. My Current Hybrid Approach: I am combining two of Apple's local machine learning technologies to solve this without sending data to the cloud: Step 1: Text-Based Layout Mapping (Vision Framework) I capture a screenshot of the targeted window using Quartz Window Services and run a local VNRecognizeTextRequest to extract coordinates for all text labels. This works exceptionally well for text buttons like "OPTION" or "ABOUT". Step 2: Contextual & Non-Text Element Interpretation (FoundationModels Framework) For controls that lack text labels (such as blank step sequencer buttons, parameter knobs, or toggle light states), I pass the screenshot as an Attachment into the new local LanguageModelSession. I ask the model to ground coordinates relative to the text landmarks mapped in Step 1. Here is a simplified snippet of how I am feeding the visual context into the local model: import Foundation import FoundationModels import Cocoa func analyzePluginInterface(cgImage: CGImage) async { guard SystemLanguageModel.default.isAvailable else { print("Local model not downloaded or available.") return } let instructions = """ You are a screen-aware assistant. Your job is to locate GUI controls on a custom 1024x802 VST window. """ let session = LanguageModelSession(instructions: instructions) do { let response = try await session.respond { "Look at this screenshot of the VST window." Attachment(cgImage) "Locate the blank step-sequencer buttons located below the instrument channel labels." "What are the center coordinates (X, Y) for the first active step?" } print("Model Grounding Output: \(response.content)") } catch { print("Inference failed: \(error)") } } My Questions for the Community: Performance & Latency: The local LanguageModelSession.respond call takes several seconds to run on device. For real-time DAW automation, this is a bottleneck. Has anyone experimented with using a custom LoRA adapter or a smaller model profile to speed up spatial coordinate inference? Coordinate Stability: Multimodal models can sometimes hallucinate coordinates (bounding box values). What strategies are you using to constrain the model output to precise pixel boundaries on varying display scaling configurations (Retina vs non-Retina)? Alternative Solutions: Are there newer on-device vision APIs (perhaps in CoreML or Vision) that are better suited for bounding-box grounding of abstract graphics (like dials/knobs) than a general language model session? Would love to hear how others are approaching screen-aware GUI interpretation with these new frameworks! Thanks!
Replies
0
Boosts
0
Views
46
Activity
1w
Siri to be interoperable with Copilot’s version control systems
Thank the elders for their knowledge and teachings. Is there a consensus regarding Siri’s utilization for the Agentic and/ or Copilot version control systems. For example the Copilot within, Edge Browser, the stand alone App, the Xbox copilot, and the M365 copilot App. Does the team have a standardized approach for the’start’ feature that can be prompted whilst utilizing Copilot’s build and generate capabilities? Thank you all and best regards.
Replies
1
Boosts
0
Views
22
Activity
1w
Foundation Model Variation within the same iOS different hardware.
We understand that on-device Foundation Models (FMs) can evolve between OS releases. To help us accurately scope our application capabilities and performance expectations for multiplatform development, could you clarify the variation of these new on-device models across different hardware? Specifically: Within the same OS & device family: Do the architecture, parameters, or capabilities of the on-device models vary based on hardware tiers (e.g., iPhone vs. iPhone Pro, or MacBook Air M5 vs. MacBook Pro with M5 Pro)? Across different device form factors: Are there model variations between hardware families running equivalent OS releases (e.g., Mac vs. iPhone)? Knowing if we are targeting a uniform model baseline or a tiered model ecosystem will greatly help us optimise our App Intelligence features or at least set us with proper expectations in scope and capabilities. Thanks.
Replies
2
Boosts
0
Views
105
Activity
1w
Speech generation by the new Foundation Model
During the Keynote (at 30m:20s) Craig Federighi mentions the second, "even more powerful version of our on-device model" and that this model lets supported products understand and generate speech. Is there any public API for generating speech using this model?
Replies
0
Boosts
0
Views
32
Activity
1w
SpotlightSearchTool arguments: description vs. JSON Schema mismatch → “Failed to parse generated content”
Using SpotlightSearchTool with a custom LanguageModel backend (Apple’s ChatCompletionsLanguageModel from foundation-models-utilities, pointed at an OpenAI-compatible server), every tool call fails with ToolCallError → "Failed to parse generated content." The model follows the tool’s documented "Call format" and emits { root, modelComposition, … }. But the generated parameters schema (FullArguments) requires { "query": { "type": "search", "value": { root, modelComposition, … } } }. Query is a QueryType union and a search must be wrapped in DiscriminatedSearch. Wrapping the args manually makes it parse and search correctly. So the description omits the query + type:"search" envelope the schema demands, which makes the tool uninvokable by any model that follows the documentation (it presumably works only with the on-device model trained on the real format). Is this a known issue / intended? Anyone gotten SpotlightSearchTool working with a non-Apple model? Secondary: CoreSpotlightSource.fetchAttributes seems to have no effect on returned attributes. kMDItemDescription only comes back when the in-query fetchAttributes requests it. Bug or expected?
Replies
1
Boosts
0
Views
65
Activity
1w
Use different model in foundation model
Hi everyone, I’m working with the WWDC26 Foundation Models framework and would like to know how to precisely control which model is used. Specifically: On-Device: How can I force SystemLanguageModel() to use AFM 3 Core Advanced (the 20B sparse multimodal variant) instead of automatically falling back to the 3B Core? Is there an API to query or explicitly specify the on-device model variant? Private Cloud Compute (PCC): When using PrivateCloudComputeLanguageModel(), how can I ensure it uses AFM 3 Cloud Pro instead of the regular Cloud model? Does setting ContextOptions.reasoningLevel = .deep guarantee the Pro model, or is it still determined automatically by the backend? So far I can only check model.capabilities, but there’s no clear way to confirm which exact model variant is actually running. Are there more granular APIs, DynamicProfile modifiers, or Instruments methods to achieve precise control? Any insights, official documentation, or WWDC session references would be greatly appreciated!
Replies
1
Boosts
0
Views
141
Activity
1w
Deployment & Entitlements
Does the Foundation Models framework support notarized, non-App Store apps on macOS, and are there specific entitlements required to access on-device system models in that environment?
Replies
1
Boosts
1
Views
49
Activity
1w
PrivateCloudComputeLanguageModel fails to respond
I am trying out the new PrivateCloudComputeLanguageModel but can't get it to work. When I call session.respond it throws the following error: Error Domain=FoundationModels.LanguageModelError Code=-1 "The operation couldn’t be completed. (FoundationModels.LanguageModelError error -1.)" UserInfo={NSMultipleUnderlyingErrorsKey=( "Error Domain=FoundationModels.LanguageModelError Code=-1 \"(null)\" UserInfo={NSMultipleUnderlyingErrorsKey=(\n \"Error Domain=ModelManagerServices.ModelManagerError Code=1046 \\\"(null)\\\" UserInfo={NSMultipleUnderlyingErrorsKey=(\\n)}\"\n)}" ), NSLocalizedDescription=The operation couldn’t be completed. (FoundationModels.LanguageModelError error -1.)} Maybe error code 1046 means something, but I can't find a mention of it in the docs. My set-up: macOS Golden Gate on a MacBook Pro M1 Xcode 27.0.0 beta 1, calling the model as part of a test on a iPhone 17 simulator with iOS 27 beta 1. I do have the Private Cloud Compute entitlement (removing it triggers a fatalError). model.isAvailable returns true. I tried logging into iCloud on both the macOS host as well as the simulator, but no difference. Relevant code: calling the model: https://github.com/Thomvis/Construct/blob/feature/foundation-models/Sources/MechMuse/FoundationModels.swift#L20 the test to run to trigger the issue: https://github.com/Thomvis/Construct/blob/feature/foundation-models/App/UnitTests/DescribeCombatantsEvaluation.swift#L78
Replies
2
Boosts
0
Views
152
Activity
1w
How to obtain more value out of a generic "FoundationModels.LanguageModelError error -1"
I created a tiny sample: provided a session with a tiny tool to tell the date and time to the model. Asked the model to stream response to "What time is it" and just get this error: The operation couldn’t be completed. (FoundationModels.LanguageModelError error -1.) There is no relevant output on Xcode console. And profiling with the new Foundation Models instrument brings zero more insight into the issue. I know it could be many things, but it there may be more information the tools could surface in debug?
Replies
4
Boosts
0
Views
74
Activity
1w
Cannot pattern match LanguageModelError from a response stream
The LanguageModelSession.GenerationErrors seems to be deprecated in favor of LanguageModelError for the most part. Now... when iterating through the ResponseStream<String> of a LanguageModelSession.streamResponse(to:options:), with a good old for await, the async iterator .next() can throws. Leaving aside that it is not very conspicuous at the call site it will throw... in the do/catch, the error thrown does not see to be able to be pattern matched to the new LanguageModelError with something like catch let error as LanguageModelError. It was able to patten match the GenerationErrors before just fine, so may be an oversight/bug?
Replies
3
Boosts
0
Views
87
Activity
1w
Adapter Training Toolkit: updated version for OS 27?
Hi all, We use Apple Foundation Models in our apps with custom LoRA adapters. Since each adapter is tied to a specific system model version, adapters have to be retrained whenever the base model changes. The toolkit version page currently lists 26.0.0 as the latest, noted as the last release for the OS 26 line. Is there an updated version of the Adapter Training Toolkit available, or expected to be posted, for the OS 27 system model? Just trying to confirm the current status so we can plan accordingly. Thanks.
Replies
1
Boosts
0
Views
87
Activity
1w