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

Provide actionable feedback for the Foundation Models framework and the on-device LLM
We are really excited to have introduced the Foundation Models framework in WWDC25. When using the framework, you might have feedback about how it can better fit your use cases. Starting in macOS/iOS 26 Beta 4, the best way to provide feedback is to use #Playground in Xcode. To do so: In Xcode, create a playground using #Playground. Fore more information, see Running code snippets using the playground macro. Reproduce the issue by setting up a session and generating a response with your prompt. In the canvas on the right, click the thumbs-up icon to the right of the response. Follow the instructions on the pop-up window and submit your feedback by clicking Share with Apple. Another way to provide your feedback is to file a feedback report with relevant details. Specific to the Foundation Models framework, it’s super important to add the following information in your report: Language model feedback This feedback contains the session transcript, including the instructions, the prompts, the responses, etc. Without that, we can’t reason the model’s behavior, and hence can hardly take any action. Use logFeedbackAttachment(sentiment:issues:desiredOutput: ) to retrieve the feedback data of your current model session, as shown in the usage example, write the data into a file, and then attach the file to your feedback report. If you believe what you’d report is related to the system configuration, please capture a sysdiagnose and attach it to your feedback report as well. The framework is still new. Your actionable feedback helps us evolve the framework quickly, and we appreciate that. Thanks, The Foundation Models framework team
0
0
2.0k
Aug ’25
Model Guardrails Too Restrictive?
I'm experimenting with using the Foundation Models framework to do news summarization in an RSS app but I'm finding that a lot of articles are getting kicked back with a vague message about guardrails. This seems really common with political news but we're talking mainstream stuff, i.e. Politico, etc. If the models are this restrictive, this will be tough to use. Is this intended? FB17904424
10
5
1.7k
1d
Private Cloud Compute throws guardrailViolation on benign song analysis (FB24938334)
On iOS 27.0, PrivateCloudComputeLanguageModel refuses a large share of harmless requests, and the same requests often succeed when simply re-run. Our app writes a short, general-audience explanation of what a song is about. When the cloud model refuses, the on-device model with .permissiveContentTransformations answers the same prompt without trouble. PCC has no guardrail configuration, so there's nothing on our side to adjust. • Two refusals came within the first sentence of plainly benign text: "Tiny Dancer" (Elton John) at 167 characters, and "In the Ghetto" (Elvis Presley) at 169 characters, while describing snow on a Chicago morning. • Others include "Already Gone" (Eagles), "Do Ya" (ELO) and "We Didn't Start the Fire" (Billy Joel). • It's non-deterministic: "Question" (The Moody Blues) was refused, then succeeded 52 seconds later with an identical request. • Most failures are "Streamed response may contain sensitive or unsafe content", arriving mid-generation, so the rejection seems to target the model's own output rather than the input. • Rewording the instructions to steer the model toward mainstream, general-audience language didn't change the refusal rate. Filed as FB24938334 with 8 logFeedbackAttachment captures (.triggeredGuardrailUnexpectedly), each including the rolled-back rejected draft. Siri language English (US), iPhone 16 Pro. Is PCC's guardrail policy expected to be tuned for content-transformation tasks like this, or is there a recommended pattern for them?
0
0
243
1d
Siri AI PCC planner: rate limiter reports count=320 over 86400 seconds while another PCC request still completes
I am investigating an intermittent Siri AI failure on an eligible iPhone running iOS 27.2 beta (24B5089g). I captured three sysdiagnoses covering a previously blocked state, a working state, and the transition from working requests into a repeatable failure. I also exported the corresponding Apple Intelligence Report. The user-visible symptom is generic: Siri AI returns a variation of “Something’s gone wrong” for requests that require the agentic planner. Basic Siri functionality may remain available. The transition capture contains the following sequence. Identifiers, request content, account information, and retry dates have been removed: 16:48:55.069 privatecloudcomputed Ropes request finished successfully 16:49:08.770 privatecloudcomputed Ropes request finished successfully 16:49:13.742 privatecloudcomputed rate limit applied for rate with count=320, duration=86400.000000 16:49:13.790 privatecloudcomputed PrivateCloudComputeError Code=32073 16:49:13.837 privatecloudcomputed rate limit applied from cached denials 16:49:13.894 intelligenceflowd deniedDueToUserDeviceRateLimit 16:49:15.439 privatecloudcomputed Ropes request finished successfully The Apple Intelligence Report aligns the planner failure with 16:49:13 and identifies the execution environment as PrivateCloudCompute. Another PCC request completed at 16:49:15, after the planner denial. This is consistent with the restriction being scoped more narrowly than complete PCC unavailability, although the successful request’s metadata is redacted in the unified log. The log wording closely matches the rate limiter in Apple’s published PCC client source. In the 2026-05-15 source release, the client counts matching request records within a moving time window and denies a request when the count reaches a configured threshold. The same implementation stores cached denials and exposes an internal loggedCountSoFar field in TrustedCloudComputeRateLimit. Relevant source locations: RateLimiter.swift RequestLog.swift DeniedRequestLog.swift TrustedCloudComputeRateLimit.swift My current interpretation is limited to the following: 320 appears to be the configured maximum for a matching request class, rather than a reading of the current count. 86400 is consistent with a rolling 24-hour window. It does not necessarily mean that recovery occurs exactly 24 hours after the first visible denial. One Siri interaction cannot be assumed to equal one rate-limit record. The published implementation records a request when it may be sent to ROPES, before the final inference result is known. The evidence establishes rate limiting as the immediate cause of this planner failure. It does not establish how the rule is divided among device, iCloud account, feature identifier, workload type, or workload parameters. Because Apple’s public source predates this beta build and does not include error 32073, source-level behavior should not be assumed to match this build in every detail. I would appreciate clarification on these points: What is the intended scope of deniedDueToUserDeviceRateLimit in this Siri planner path: device, person/account, feature, workload, or a combination? Does count=320, duration=86400 describe a rolling window in current builds? Are attempts rejected from a cached denial excluded from the rolling request count? The published implementation appears to return the existing denial before the request-send accounting path, but I have not established that the current build behaves identically. Is there a supported diagnostic that reports the applicable rate-limit rule, loggedCountSoFar, and a non-redacted retry time to the device owner or through Feedback Assistant? Is it expected that another PCC workload can complete immediately after the Siri planner is denied? Should a user-visible generic Siri error distinguish this condition from network or service failures and offer a meaningful retry interval? For comparison, another developer has reported a cumulative PCC wall that surfaced as either rateLimited or quotaLimitReached while the public quota state remained healthy: Developer Forums thread 843046. My capture differs by providing the client rule parameters and a Siri-specific deniedDueToUserDeviceRateLimit result. I am retaining the original, unmodified sysdiagnoses and report export and can submit them through Feedback Assistant with precise timestamps. I am also running a low-frequency recovery observation and a same-account cross-device comparison. I will update this thread with recovery bounds and will correct the interpretation if later evidence does not support it.
1
1
604
3d
Restricting App Installation to Devices Supporting Apple Intelligence Without Triggering Game Mode
Hello, My app fully relies on the new Foundation Models. Since Foundation Models require Apple Intelligence, I want to ensure that only devices capable of running Apple Intelligence can install my app. When checking the UIRequiredDeviceCapabilities property for a suitable value, I found that iphone-performance-gaming-tier seems the closest match. Based on my research: On iPhone, this effectively limits installation to iPhone 15 Pro or later. On iPad, it ensures M1 or newer devices. This exactly matches the hardware requirements for Apple Intelligence. However, after setting iphone-performance-gaming-tier, I noticed that on iPad, Game Mode (Game Overlay) is automatically activated, and my app is treated as a game. My questions are: Is there a more appropriate UIRequiredDeviceCapabilities value that would enforce the same Apple Intelligence hardware requirements without triggering Game Mode? If not, is there another way to restrict installation to devices meeting Apple Intelligence requirements? Is there a way to prevent Game Mode from appearing for my app while still using this capability restriction? Thanks in advance for your help.
8
0
2.6k
4d
Adding MCP and connector support to your own Foundation Models apps
Circling back on the LocalLM Lab arc. With v0.7, we've moved from prompt experimentation into real app development on Apple's Foundation Models local AI. The LocalLM Lab SDK lets you build that same on-device model and MCP client this thread has covered directly into your own app, with real tool and data access (Slack, Todoist, GitHub, Notion, Linear, plus Calendar, Reminders, Contacts and Location). And you can ship your app including through the Mac App Store. This is a big improvement over version 0.6, where the localai-cli toolkit needed LocalLM Lab installed and running. On the other hand, the SDK (LocalLMLabSDKCore) doesn't relay through anything; it links FoundationModels and a real MCP client directly into your own binary and is totally self-contained. The example included in the SDK, Plate Today, has actually been built into a sandboxed test app and verified working, with a signed path to a Mac App Store .pkg (Apple Distribution signing + provisioning profile pipeline). That's "verified signable and sandbox-compatible," to be precise. Entitlements (from personal experience: always a complicated topic): com.apple.security.app-sandbox + com.apple.security.network.client for the app itself, plus the standard personal-information entitlements per connector used (com.apple.security.personal-information.calendars, .addressbook, .location) and matching NS*UsageDescription strings in Info.plist. The one worth flagging specifically: the network entitlement is easy to miss and fails silently rather than throwing. Without it, MCP connections and Weather calls just hang with no error surfaced. OAuth handling requires the app delegate callback (application(_:open:)), not SwiftUI's .onOpenURL. Worth knowing before wiring it up if you're SwiftUI-only. Full entitlements list + SDK guide: https://github.com/ancientcomputing/locallm/blob/main/docs/sdk-guide.md Feature page: thisbrain.ai/locallm/sdk.html I hope the availability of the SDK (free, Apache 2.0 license) will give folks further incentive to explore local AI-enabled applications on the Mac. What else would you want to do that the SDK doesn't currently support? File picker? Calendar/Reminders/Contacts edits & writes?
5
1
1.7k
5d
What Happened to Transcript.CustomSegment?
Transcript.CustomSegment and the .custom case on Transcript.Segment were in the Xcode-beta 27 builds. WWDC26 session 339 covers them as the way a model package extends the protocol for new modalities and server side tool output. In the Xcode 27 GM they are gone along with the matching action on the executor generation channel. Is there any additional information as to what happened to custom segments, a replacement, etc? I don't see any mentions of this change in any release notes, though perhaps I'm looking in the wrong place.
1
0
188
5d
Private Cloud Compute off-ramp to third party solutions
Open Letter to Apple Leadership To: John Ternus, Chief Executive Officer Craig Federighi, Senior Vice President of Software Engineering Greg “Joz” Joswiak, Senior Vice President of Worldwide Marketing Apple Developer Relations & App Store Small Business Review Teams Subject: PCC & Developer Continuity: Implementing a Paid Tier for Private Cloud Compute (PCC) Dear John, Craig, Greg, and the Apple Developer Relations Team, I write to you as a new developer community member. While developing several Apple applications, I was glad to find deeply integrated applications through Apple Intelligence and the Private Cloud Compute (PCC) architecture that can be used to add features and capabilities to these applications. By eliminating early-stage cloud API friction, you gave indie developers the exact "on-ramp" needed to build incredible, localized AI tools. However, the current off-ramp mechanism built into the App Store Small Business Program enrollment is actively penalizing developer success. Your documentation outlines a rigid, unyielding pipeline for growing applications: "If any app subsequently exceeds the 2 million first-time downloads threshold, or the developer is no longer enrolled in the App Store Small Business Program, the developer will be notified and must migrate to an alternative solution within 6 months." While I know that it is highly unlikely that my downloads will exceed 2 million (shoot for the moon though, one never knows), since Apple does not distribute its frontier-tier server model weights, developers who reach this milestone will be forced to migrate their core features onto third-party infrastructure like AWS, OpenAI, or Microsoft Azure. This policy introduces a severe, counterproductive paradox into the Apple ecosystem: This will force successful devs to move to third party AI providers and away from Apple's tools. I am sure this is not a desired result at Apple. Or, it will have a chilling effect: developers will not use PCC if this a potential hurdle they might have to jump in the future. Why bother at all to begin with if this might be the end result. *Forced Migration Breaks Developer Continuity: Forcing growing apps off PCC means developers must completely swap out backend configurations. Instead of focusing on enhancing their apps for your new hardware, developers must waste critical engineering cycles rebuilding infrastructure on third-party clouds. Abandoning the Privacy Promise: Apple built its reputation on an uncompromising commitment to user privacy. PCC extends the secure enclave to the cloud. Forcing a developer to move their traffic to a third-party server means forcing users to trust external corporate entities with data that could have stayed inside Apple’s secure ecosystem. The "Success Tax": For mid-sized developers, the transition is a massive financial cliff. A commercial AWS instance capable of running an open-weight equivalent model introduces steep fixed baseline costs. My Proposal: A Predictable, Commercial Pay-As-You-Go PCC Tier after the limit, rather than an off-ramp to Apple's competitors: Instead of forcing growing developers onto AWS, Google Cloud, or OpenAI, Apple should allow developers to transition to a paid PCC commercial plan upon crossing the 2 million download or small business revenue thresholds. Whether structured as a metered developer API cost or an explicit tier integrated into Xcode and App Store Connect, developers want the option to pay Apple directly to stay on your hardware. This achieves your goal of preventing data centers from becoming a subsidized utility while ensuring our apps don't break when they go viral. Apple has always championed the idea that the best experiences happen when hardware, software, and services are vertically integrated. Forcing your most successful developers to sever that integration and hand their infrastructure over to external cloud providers at the exact moment they achieve scale undermines the ecosystem you’ve worked so hard to build. Please give us a path to grow with Apple, not away from it. Sincerely, The Apple Developer Community
0
0
326
6d
Error in Xcode console
Lately I am getting this error. GenerativeModelsAvailability.Parameters: Initialized with invalid language code: en-GB. Expected to receive two-letter ISO 639 code. e.g. 'zh' or 'en'. Falling back to: en Does anyone know what this is and how it can be resolved. The error does not crash the app
5
2
2k
1w
FoundationModels guided generation: empty token masks and severe slowdowns on macOS 27 betas 5, 6 and 7
Has anyone else hit this? We have a Mac app that uses FoundationModels with @Generable types for structured output. Starting with macOS 27 beta 5 every guided generation request began logging tokenizer errors and long structured requests slowed from seconds to minutes. Beta 6 and beta 7 both still have it. Filed as FB24310823 on August 11 with a full sysdiagnose and log captures, and we have appended evidence from each beta since. The signature is easy to check. Stream the log while your app generates: log stream --predicate 'subsystem == "com.apple.tokengenerationcore"' --style compact On an affected machine the inference service (TGOnDeviceInferenceProviderService, category guided) prints these two lines in matched pairs, thousands of times: Generated an empty mask at recognizer index N allowedTokenIDs is empty. Something is likely wrong with the tokenizer What we measured on beta 7 today: 9,008 of those pairs in about five and a half minutes of scanning. The errors start about one second into the first request after a fresh app launch, so it needs no warmup. Requests that normally finish in 4 to 12 seconds take 77 to 170 seconds or longer. On beta 5 we measured decode at roughly 0.3 tokens per second on the worst requests. Short requests still finish at normal speed but they emit the same errors while they run, and the quality of the structured content they return is degraded. On betas 5 and 6 we also saw repeated asset release errors for instruct_300m.tokenizer and the instruct_3b tokenizer saying the asset is not marked as in use. For what it is worth, a build that ran clean on beta 4 shows the same behavior on beta 5 and later with no app changes, and the same @Generable schema drives both the fast and the slow requests. But we know that does not rule out something on our side, and we would honestly be happy to learn this is our own bug since that would mean we can fix it. So two questions. Is anyone else seeing this since beta 5? And if you spot something we might be doing wrong on our end, sessions we should be recreating, schema patterns that stress the constrained decoder, anything at all, we would really appreciate the feedback. If it does turn out you are hitting the same thing, a Feedback referencing FB24310823 would help a lot. Thanks!
20
1
3.5k
1w
Exploring Apple Silicon + MLX for a persistent local AI companion architecture
I’m developing an independent project in Scotland called Isla Watson. The architecture is built around a simple principle: the model is replaceable; the identity is not. Long-term memory, persistent internal state and identity are designed to remain outside the foundation model, allowing local models to act as replaceable reasoning and language components without resetting the companion. I’m now exploring whether Apple Silicon and MLX could provide the long-term local compute platform for the system — including specialist Mac nodes for reasoning, memory, speech and perception, with distributed inference when larger models are required. A particular area of interest is whether multiple Macs can be used in two complementary ways: as independent specialist agents during normal operation; and as a distributed MLX inference group when a larger model exceeds the capacity of one machine. The first technical study I’d like to establish is a reproducible 1-node → 2-node baseline, measuring model capacity, unified-memory use, time to first token, generation throughput, power consumption, agent concurrency and distributed scaling efficiency. The wider research goal is to keep persistent identity and state independent from whichever foundation model is currently providing language and reasoning. I’d particularly value guidance from anyone working with MLX distributed inference, Thunderbolt/RDMA multi-Mac setups, or local agent architectures. I’ve also posted an architecture-level overview in the MLX GitHub community and have a one-page public brief available for anyone interested in the wider design. https://github.com/ml-explore/mlx/discussions/4482
1
0
348
1w
Can Apple Foundation Models with PCC be used in a Developer ID distributed macOS app?
I am developing a third-party macOS application that uses Apple Foundation Models, including Private Cloud Compute (PCC). I would like to confirm the supported distribution requirements for this use case. Specifically: Can a third-party macOS application use Apple Foundation Models / PCC as part of its application functionality? Is PCC usage supported when the macOS application is distributed outside the Mac App Store using Developer ID signing and Apple notarization? Are there any additional entitlements, distribution requirements, or restrictions for PCC when distributing outside the Mac App Store? I intend to use only Apple's documented and supported APIs and will not attempt to bypass PCC availability, quota, entitlement, or other platform restrictions. Thank you.
3
0
1.3k
3w
Does prewarming a short-lived LanguageModelSession benefit a later session?
I’m building Summon (https://github.com/NakliTechie/summon), an open-source native macOS launcher that uses the on-device SystemLanguageModel. Summon creates a fresh LanguageModelSession for each query and attaches only the read-only tools relevant to that query. It currently calls prewarm() after the first keystroke using a temporary session, then creates a different session for generation. The documentation describes prewarm(promptPrefix:) as loading the resources required “for this session.” I would value guidance on four points: Is the prewarming benefit scoped to that exact LanguageModelSession instance? Does a later session using the same SystemLanguageModel receive any benefit? For an ephemeral launcher, is retaining one session preferable to creating a fresh session per query? Which Foundation Models Instrument signal identifies an ineffective prewarm or cache invalidation? Thank You Chirag
1
0
396
3w
Is programmatic use of fm serve from a distributed macOS app permitted?
I am developing a macOS developer tool that uses Apple Foundation Models, including the Private Cloud Compute (PCC) model. On macOS 27, the Foundation Models CLI provides fm serve, which exposes a local Chat Completions API, including: POST /v1/chat/completions My application communicates with this local API on the user's own Mac to provide agent-style development features. The Foundation Models CLI Legal Notice states: “You are also agreeing to not programmatically access or use Apple models through Apple software or services except as expressly permitted.” I would like to confirm whether using the local API intentionally exposed by fm serve from a third-party macOS application distributed to users is considered an expressly permitted use. The application would: use only the interfaces and endpoints officially exposed by the fm CLI; run fm serve locally on the user's Mac; use the user's own Foundation Models / PCC availability and quota; not bypass quota limits; not use private or undocumented APIs; not reverse engineer Apple services. Is this use of fm serve permitted for a distributed third-party macOS application? If so, are there any additional requirements or restrictions that developers should follow when distributing an application that integrates with fm serve in this way? Thank you.
1
0
535
4w
"Error Domain=ModelManagerServices.ModelManagerError Code=1026 \"(null)\" UserInfo={NSMultipleUnderlyingErrorsKey=(\n)}"
import Playgrounds import FoundationModels #Playground { do { let session = LanguageModelSession() let response = try await session.respond( to: "Explain SwiftUI in one sentence." ) print(response.content) } catch { print("Error: \(error)") } }``` I tested Foundation Models with this simple code, and it generated this error: "Error Domain=ModelManagerServices.ModelManagerError Code=1026 \"(null)\" UserInfo={NSMultipleUnderlyingErrorsKey=(\n)}" I tried restarting my Mac and Apple Intelligence, but that didn't work. What did work was updating Xcode and the simulators to the latest possible version.
2
0
193
Aug ’26
What signal should drive fallback for PrivateCloudComputeLanguageModel?
I'm building an app that uses PrivateCloudComputeLanguageModel as the primary inference tier with SystemLanguageModel as the fallback. The app is entitled (com.apple.developer.private-cloud-compute, granted and provisioned) and generations serve normally. My question is how a client should decide to fall back because in extended measurement, no public signal ever reflects the blocked state I actually hit. What I measured (macOS 27.0 beta, 26A5416b / Xcode 27 beta 27A5237l, entitled signed bundle constructing PrivateCloudComputeLanguageModel directly): Serving stopped mid-run with no leading signal: request N served normally (1.4 s), request N+1 threw LanguageModelError.rateLimited 494 ms later, at cumulative generation 786 for the day. 100% served → 100% refused between consecutive calls. Every quota signal read healthy the entire time: before, during, and after the block. Across 1,517 readings in a single day: quotaUsage.status = belowLimit, isApproachingLimit = false, isLimitReached = false, resetDate = nil, availability = .available. A preflight on these APIs cannot see the condition. The refusal is enforced locally after first contact: rejections return in ~230 ms vs ~0.9–1.4 s for served calls, so the client appears to cache the verdict rather than ask the server per-request. The trigger is a cumulative ledger, not a request rate: 501 generations at 33/min in one 15-minute sitting was fine, and a later arm sustained 39.7/min; two bursts of 16 concurrent at 5.0 and 5.2 req/s served 32/32; the count that tripped survived a process restart and a 4.9-hour idle gap. But it's not a fixed daily number either. 501 fast was fine earlier the same day; the trip came 285 requests later. A rolling window on the order of hours-to-a-day is consistent with this, but nothing here measures its length. Recovery: still blocked at +41 minutes (probes at +1/2/5/10/20/40 min all refused); fully recovered by +20 h with no intervention and no upgrade. Next day served normally from the first request. quotaLimitReached never occurred: not once in ~800 generations plus the blocked period. The wall is typed as the transient error while carrying what the documentation describes as daily quota semantics ("a person either waits for their usage quota to refresh or they upgrade"). limitIncreaseSuggestion is presence-constant: nil at process start, non-nil on every reading after first PCC contact (identical while fully serving and while fully blocked) so its presence can't gate an upsell affordance. The same signals-read-healthy-while-refusing divergence also reproduces against the developer-tool pool (fm serve), which I've reported separately (FB24273854 covers quota exhaustion surfacing there as a generic server_error/500 while /health reports the model available). Questions: Is attempt-and-classify the intended contract? Given that no preflight can observe the blocked state, should a client simply issue the request, treat the typed error as authoritative, and route to SystemLanguageModel? And is the ~230 ms local fail-fast on the blocked path contractual (cheap and safe to probe) or incidental? This is the one that decides how I ship; the rest are diagnostics behind it. What does quotaUsage actually track, and at what granularity? I have driven the entitled app-tier path to a hard block and the developer-tool pool to exhaustion, and no field ever moved. Is there any consumption pattern that moves isApproachingLimit / isLimitReached / resetDate? If the intended answer is "only the per-person daily quota, which these volumes never approached," what is the wall I am hitting at ~786 cumulative, and why does it surface as rateLimited? Should rateLimited and quotaLimitReached drive different client behavior — and which one is the daily allowance in practice? The documentation distinguishes rate limiting ("wait a period and retry") from daily exhaustion ("wait for refresh or upgrade"), but what I observe is the transient-typed error carrying the multi-hour ledger semantics. Concretely: what retry cadence is recommended after rateLimited (my measured recovery horizon was somewhere between 41 minutes and 20 hours. My current design stays on the on-device model and re-probes PCC at a low fixed interval rather than per-request)? And under what condition is resetDate ever populated, given it was nil even while blocked? (Smaller, design guidance): my app can generate a few hundred requests as one feature batch (quiz generation over a user's imported document). Measured: 501 in a sitting was fine, cumulative 786 in a day was not. Since this allowance belongs to the person and is shared with every Apple Intelligence feature, is a several-hundred-request batch a reasonable use of it, or should features like this generate on demand? (I'm aware of the existing feature request for richer quota reporting (FB23378161); this is a narrower design question.) I can attach the measurement driver and timestamped JSONL logs. The divergence is reproducible on a fresh day, though reaching the wall took ~800 cumulative generations.
4
0
1.3k
Aug ’26
False-positive guardrail blocks guided generation for sports data
I’m developing a factual snooker application using the on-device SystemLanguageModel on the current iOS 27, Xcode and macOS betas. The app allows someone to ask questions about professional snooker players. A tool searches my server and returns verified player data such as the player’s ID, name, nationality and date of birth. I have encountered a reproducible false-positive guardrail violation when the user asks about the professional snooker player Judd Trump. For example: Tell me about Judd Trump With the default model configuration, the request fails because the input or output is classified as potentially sensitive or unsafe. Using permissive content transformations solves the problem when generating a normal String: let model = SystemLanguageModel( useCase: .general, guardrails: .permissiveContentTransformations ) let session = LanguageModelSession( model: model, tools: [FindPlayerTool()], instructions: """ Answer factual questions about professional snooker players. Always use the supplied tool and only use verified tool data. Names returned by the tool are names of real snooker players and should be treated only as sporting entities. """ ) let response = try await session.respond( to: "Tell me about Judd Trump" ) This successfully calls the tool and produces a factual string response. However, I need guided generation because the model should be able to choose a combination of predefined UI components, such as: A player card A match card An event card A rankings table Explanatory text A simplified response type looks like this: @Generable struct CueQueryReply { let blocks: [ReplyBlock] } @Generable enum ReplyBlock { case playerCard(PlayerCardBlock) case text(TextBlock) } @Generable struct PlayerCardBlock { let playerId: Int let name: String let nationality: String let born: String } @Generable struct TextBlock { let text: String } The guided request is: let response = try await session.respond( to: "Tell me about Judd Trump", generating: CueQueryReply.self ) This reproduces the guardrail violation, even though the model is configured with: guardrails: .permissiveContentTransformations I understand that the documentation says permissive content transformations apply to string generation and that guided generation behaves like the default guardrails. However, this creates a difficult limitation for legitimate factual applications. “Judd Trump” is the real name of a professional snooker player, and the data is coming from a controlled, verified API. Renaming, removing or concealing the player is not a viable product solution. My questions are: Is this specific “Judd Trump” behaviour considered a guardrail false positive that should be reported through Feedback Assistant? Is there any supported way on iOS 27 to use permissive content transformations with guided generation? Can Dynamic Profiles, Dynamic Generation Schemas or another Foundation Models API change the guardrail behaviour for a controlled guided-generation request? Is there a recommended architecture for producing typed UI instructions while retaining the permissive behaviour available to string responses? Would generating only component types and verified IDs—for example .playerCard(playerId: 12)—be the recommended approach, provided the actual player data is resolved and displayed by SwiftUI? I understand the need for safety guardrails and am not attempting to disable the model’s underlying safety behaviour. I am trying to process a harmless, factual sporting name while using Foundation Models’ typed output features. The on-device model otherwise appears capable of handling this use case well, and keeping the experience on-device, private and free of external API dependencies is an important part of the product. I would appreciate any guidance from the Foundation Models team about whether this is expected behaviour, a beta issue, or something for which there is an intended iOS 27 solution.
0
0
327
Aug ’26
FoundationModels guided generation: empty token masks and slow structured output on macOS 27 betas 5, 6 and 7
Hey everyone, hoping to compare notes on something we have been chasing since beta 5. We have a Mac app that uses FoundationModels with @Generable types for structured output. Starting with macOS 27 beta 5, guided generation requests began logging tokenizer errors and our longer structured requests slowed from seconds to minutes. We are still seeing the same thing on beta 6 and beta 7. We filed it as FB24310823 on August 11 with a sysdiagnose and log captures. The signature is easy to check if you want to see whether your machine does it too. Stream the log while your app generates: log stream --predicate 'subsystem == "com.apple.tokengenerationcore"' --style compact On our machine the inference service (TGOnDeviceInferenceProviderService, category guided) prints these two lines in matched pairs, thousands of times: Generated an empty mask at recognizer index N allowedTokenIDs is empty. Something is likely wrong with the tokenizer Some numbers from beta 7 today: 9,008 of those pairs in about five and a half minutes. The errors start about one second into the first request after a fresh app launch. Requests that normally finish in 4 to 12 seconds take 77 to 170 seconds or longer. On beta 5 we measured decode at roughly 0.3 tokens per second on the worst requests. Short requests still finish at normal speed but they emit the same errors while they run, and the structured content they return looks degraded to us. On betas 5 and 6 we also saw repeated asset release errors for instruct_300m.tokenizer and the instruct_3b tokenizer saying the asset is not marked as in use. For what it is worth, a build that ran clean on beta 4 shows the same behavior on beta 5 and later with no app changes, and the same @Generable schema drives both the fast and the slow requests. But we know that does not rule out something on our side, and we would honestly be happy to learn this is our own bug since that would mean we can fix it. So two questions. Is anyone else seeing this since beta 5? And if you spot something we might be doing wrong on our end, sessions we should be recreating, schema patterns that stress the constrained decoder, anything at all, we would really appreciate the feedback. If it does turn out you are hitting the same thing, a Feedback referencing FB24310823 would help a lot. Thanks!
4
0
434
Aug ’26
Foundation Models tool-calling differs significantly between iPhone 16 and iPhone 17 Pro Max
I'm seeing a reproducible difference in Foundation Models behavior between an iPhone 16 and iPhone 17 Pro Max, both running iOS 27.0 beta 6. My pipeline is roughly: Input → model generation → tool call → validation/correction → structured output Each test starts with a fresh model session. I run the same 50-case dataset on both devices with the same app build, prompt, tool, data, and execution order. The main difference is not just speed: the iPhone 16 consistently makes many more tool calls, which causes the session context to grow until some runs exceed the available context window. Both devices report a context size of roughly 4,096 tokens. Metric iPhone 16 iPhone 17 Pro Max Completed 30/50 49/50 Total tool calls 222 67 Mean calls/run 4.44 1.34 Max calls/run 22 2 Verified outputs 75.1% 91.0% The pattern is very consistent across repeated runs. On the 17 Pro Max, most requests converge after 1–2 tool calls. On the iPhone 16, some requests enter longer tool/correction loops and eventually fail because the context grows too large. I can probably mitigate this by limiting tool calls or changing the prompt, but I'd like to understand the underlying behavior. Is this difference expected across supported devices even on the same OS version? In particular: Can different on-device model variants be used depending on hardware? Is there a way to determine which model/profile a SystemLanguageModel session is using? Should tool-selection behavior be expected to remain reasonably consistent across devices? Would this be worth filing as a Foundation Models regression during the beta?
2
0
882
Aug ’26
Rate limit from SensitiveContentAnalysisML never lifts when using PCC
I keep running into rate limit issues that never go away while the app is running when trying to analyze images using Private Cloud Compute in iOS 27 Beta 6. After 20 or so images, I get a rate limit error from PCC, but the actual rate limit seems to come from SCML (see relevant log entries below). Once this happens, any attempted PCC requests result in an immediate rate limit error, no matter how long I wait, so long as the app is running. If I kill the app and relaunch, I no longer receive the rate limit error (unless, again I run several images through in succession). So it seems like once this state is triggered, you are stuck in it until you kill and relaunch the app. Has anyone else encountered this or have a workaround? I've filed a feedback already: FB24419603 Passing along Client rate limit exceeded, try again later in response to ExecuteRequest Passing along Client rate limit exceeded, try again later in response to ExecuteRequest systemPromptID failed for task textSafety: Rate limited. Wait a little bit and then try again.::Rate limited. Wait a little bit and then try again.: Client rate limit exceeded, try again later::Client rate limit exceeded, try again later; prompt template also not found: Rate limited. Wait a little bit and then try again.::Rate limited. Wait a little bit and then try again.: Client rate limit exceeded, try again later::Client rate limit exceeded, try again later End sanitizeText with error: Error Domain=com.apple.SensitiveContentAnalysisML Code=15 "SCML.CombinedTextSanitizerBackend.BackendError("SafetyGuardrailTextSanitizerBackend"): Rate limited. Wait a little bit and then try again." UserInfo={NSLocalizedDescription=SCML.CombinedTextSanitizerBackend.BackendError("SafetyGuardrailTextSanitizerBackend"): Rate limited. Wait a little bit and then try again., NSUnderlyingError=0x11a632ee0 {Error Domain=SensitiveContentAnalysisML.CombinedTextSanitizerBackend.BackendError Code=1 "SCML.CombinedTextSanitizerBackend.BackendError("SafetyGuardrailTextSanitizerBackend"): Rate limited. Wait a little bit and then try again." UserInfo={NSUnderlyingError=0x11a5dd380 {Error Domain=com.apple.GenerativeFunctionsFoundation.GenerativeError Code=1010000 "Rate limited. Wait a little bit and then try again."}, NSLocalizedDescription=SCML.CombinedTextSanitizerBackend.BackendError("SafetyGuardrailTextSanitizerBackend"): Rate limited. Wait a little bit and then try again.}}}
3
0
182
Aug ’26
Provide actionable feedback for the Foundation Models framework and the on-device LLM
We are really excited to have introduced the Foundation Models framework in WWDC25. When using the framework, you might have feedback about how it can better fit your use cases. Starting in macOS/iOS 26 Beta 4, the best way to provide feedback is to use #Playground in Xcode. To do so: In Xcode, create a playground using #Playground. Fore more information, see Running code snippets using the playground macro. Reproduce the issue by setting up a session and generating a response with your prompt. In the canvas on the right, click the thumbs-up icon to the right of the response. Follow the instructions on the pop-up window and submit your feedback by clicking Share with Apple. Another way to provide your feedback is to file a feedback report with relevant details. Specific to the Foundation Models framework, it’s super important to add the following information in your report: Language model feedback This feedback contains the session transcript, including the instructions, the prompts, the responses, etc. Without that, we can’t reason the model’s behavior, and hence can hardly take any action. Use logFeedbackAttachment(sentiment:issues:desiredOutput: ) to retrieve the feedback data of your current model session, as shown in the usage example, write the data into a file, and then attach the file to your feedback report. If you believe what you’d report is related to the system configuration, please capture a sysdiagnose and attach it to your feedback report as well. The framework is still new. Your actionable feedback helps us evolve the framework quickly, and we appreciate that. Thanks, The Foundation Models framework team
Replies
0
Boosts
0
Views
2.0k
Activity
Aug ’25
Model Guardrails Too Restrictive?
I'm experimenting with using the Foundation Models framework to do news summarization in an RSS app but I'm finding that a lot of articles are getting kicked back with a vague message about guardrails. This seems really common with political news but we're talking mainstream stuff, i.e. Politico, etc. If the models are this restrictive, this will be tough to use. Is this intended? FB17904424
Replies
10
Boosts
5
Views
1.7k
Activity
1d
Private Cloud Compute throws guardrailViolation on benign song analysis (FB24938334)
On iOS 27.0, PrivateCloudComputeLanguageModel refuses a large share of harmless requests, and the same requests often succeed when simply re-run. Our app writes a short, general-audience explanation of what a song is about. When the cloud model refuses, the on-device model with .permissiveContentTransformations answers the same prompt without trouble. PCC has no guardrail configuration, so there's nothing on our side to adjust. • Two refusals came within the first sentence of plainly benign text: "Tiny Dancer" (Elton John) at 167 characters, and "In the Ghetto" (Elvis Presley) at 169 characters, while describing snow on a Chicago morning. • Others include "Already Gone" (Eagles), "Do Ya" (ELO) and "We Didn't Start the Fire" (Billy Joel). • It's non-deterministic: "Question" (The Moody Blues) was refused, then succeeded 52 seconds later with an identical request. • Most failures are "Streamed response may contain sensitive or unsafe content", arriving mid-generation, so the rejection seems to target the model's own output rather than the input. • Rewording the instructions to steer the model toward mainstream, general-audience language didn't change the refusal rate. Filed as FB24938334 with 8 logFeedbackAttachment captures (.triggeredGuardrailUnexpectedly), each including the rolled-back rejected draft. Siri language English (US), iPhone 16 Pro. Is PCC's guardrail policy expected to be tuned for content-transformation tasks like this, or is there a recommended pattern for them?
Replies
0
Boosts
0
Views
243
Activity
1d
Siri AI PCC planner: rate limiter reports count=320 over 86400 seconds while another PCC request still completes
I am investigating an intermittent Siri AI failure on an eligible iPhone running iOS 27.2 beta (24B5089g). I captured three sysdiagnoses covering a previously blocked state, a working state, and the transition from working requests into a repeatable failure. I also exported the corresponding Apple Intelligence Report. The user-visible symptom is generic: Siri AI returns a variation of “Something’s gone wrong” for requests that require the agentic planner. Basic Siri functionality may remain available. The transition capture contains the following sequence. Identifiers, request content, account information, and retry dates have been removed: 16:48:55.069 privatecloudcomputed Ropes request finished successfully 16:49:08.770 privatecloudcomputed Ropes request finished successfully 16:49:13.742 privatecloudcomputed rate limit applied for rate with count=320, duration=86400.000000 16:49:13.790 privatecloudcomputed PrivateCloudComputeError Code=32073 16:49:13.837 privatecloudcomputed rate limit applied from cached denials 16:49:13.894 intelligenceflowd deniedDueToUserDeviceRateLimit 16:49:15.439 privatecloudcomputed Ropes request finished successfully The Apple Intelligence Report aligns the planner failure with 16:49:13 and identifies the execution environment as PrivateCloudCompute. Another PCC request completed at 16:49:15, after the planner denial. This is consistent with the restriction being scoped more narrowly than complete PCC unavailability, although the successful request’s metadata is redacted in the unified log. The log wording closely matches the rate limiter in Apple’s published PCC client source. In the 2026-05-15 source release, the client counts matching request records within a moving time window and denies a request when the count reaches a configured threshold. The same implementation stores cached denials and exposes an internal loggedCountSoFar field in TrustedCloudComputeRateLimit. Relevant source locations: RateLimiter.swift RequestLog.swift DeniedRequestLog.swift TrustedCloudComputeRateLimit.swift My current interpretation is limited to the following: 320 appears to be the configured maximum for a matching request class, rather than a reading of the current count. 86400 is consistent with a rolling 24-hour window. It does not necessarily mean that recovery occurs exactly 24 hours after the first visible denial. One Siri interaction cannot be assumed to equal one rate-limit record. The published implementation records a request when it may be sent to ROPES, before the final inference result is known. The evidence establishes rate limiting as the immediate cause of this planner failure. It does not establish how the rule is divided among device, iCloud account, feature identifier, workload type, or workload parameters. Because Apple’s public source predates this beta build and does not include error 32073, source-level behavior should not be assumed to match this build in every detail. I would appreciate clarification on these points: What is the intended scope of deniedDueToUserDeviceRateLimit in this Siri planner path: device, person/account, feature, workload, or a combination? Does count=320, duration=86400 describe a rolling window in current builds? Are attempts rejected from a cached denial excluded from the rolling request count? The published implementation appears to return the existing denial before the request-send accounting path, but I have not established that the current build behaves identically. Is there a supported diagnostic that reports the applicable rate-limit rule, loggedCountSoFar, and a non-redacted retry time to the device owner or through Feedback Assistant? Is it expected that another PCC workload can complete immediately after the Siri planner is denied? Should a user-visible generic Siri error distinguish this condition from network or service failures and offer a meaningful retry interval? For comparison, another developer has reported a cumulative PCC wall that surfaced as either rateLimited or quotaLimitReached while the public quota state remained healthy: Developer Forums thread 843046. My capture differs by providing the client rule parameters and a Siri-specific deniedDueToUserDeviceRateLimit result. I am retaining the original, unmodified sysdiagnoses and report export and can submit them through Feedback Assistant with precise timestamps. I am also running a low-frequency recovery observation and a same-account cross-device comparison. I will update this thread with recovery bounds and will correct the interpretation if later evidence does not support it.
Replies
1
Boosts
1
Views
604
Activity
3d
Restricting App Installation to Devices Supporting Apple Intelligence Without Triggering Game Mode
Hello, My app fully relies on the new Foundation Models. Since Foundation Models require Apple Intelligence, I want to ensure that only devices capable of running Apple Intelligence can install my app. When checking the UIRequiredDeviceCapabilities property for a suitable value, I found that iphone-performance-gaming-tier seems the closest match. Based on my research: On iPhone, this effectively limits installation to iPhone 15 Pro or later. On iPad, it ensures M1 or newer devices. This exactly matches the hardware requirements for Apple Intelligence. However, after setting iphone-performance-gaming-tier, I noticed that on iPad, Game Mode (Game Overlay) is automatically activated, and my app is treated as a game. My questions are: Is there a more appropriate UIRequiredDeviceCapabilities value that would enforce the same Apple Intelligence hardware requirements without triggering Game Mode? If not, is there another way to restrict installation to devices meeting Apple Intelligence requirements? Is there a way to prevent Game Mode from appearing for my app while still using this capability restriction? Thanks in advance for your help.
Replies
8
Boosts
0
Views
2.6k
Activity
4d
Adding MCP and connector support to your own Foundation Models apps
Circling back on the LocalLM Lab arc. With v0.7, we've moved from prompt experimentation into real app development on Apple's Foundation Models local AI. The LocalLM Lab SDK lets you build that same on-device model and MCP client this thread has covered directly into your own app, with real tool and data access (Slack, Todoist, GitHub, Notion, Linear, plus Calendar, Reminders, Contacts and Location). And you can ship your app including through the Mac App Store. This is a big improvement over version 0.6, where the localai-cli toolkit needed LocalLM Lab installed and running. On the other hand, the SDK (LocalLMLabSDKCore) doesn't relay through anything; it links FoundationModels and a real MCP client directly into your own binary and is totally self-contained. The example included in the SDK, Plate Today, has actually been built into a sandboxed test app and verified working, with a signed path to a Mac App Store .pkg (Apple Distribution signing + provisioning profile pipeline). That's "verified signable and sandbox-compatible," to be precise. Entitlements (from personal experience: always a complicated topic): com.apple.security.app-sandbox + com.apple.security.network.client for the app itself, plus the standard personal-information entitlements per connector used (com.apple.security.personal-information.calendars, .addressbook, .location) and matching NS*UsageDescription strings in Info.plist. The one worth flagging specifically: the network entitlement is easy to miss and fails silently rather than throwing. Without it, MCP connections and Weather calls just hang with no error surfaced. OAuth handling requires the app delegate callback (application(_:open:)), not SwiftUI's .onOpenURL. Worth knowing before wiring it up if you're SwiftUI-only. Full entitlements list + SDK guide: https://github.com/ancientcomputing/locallm/blob/main/docs/sdk-guide.md Feature page: thisbrain.ai/locallm/sdk.html I hope the availability of the SDK (free, Apache 2.0 license) will give folks further incentive to explore local AI-enabled applications on the Mac. What else would you want to do that the SDK doesn't currently support? File picker? Calendar/Reminders/Contacts edits & writes?
Replies
5
Boosts
1
Views
1.7k
Activity
5d
What Happened to Transcript.CustomSegment?
Transcript.CustomSegment and the .custom case on Transcript.Segment were in the Xcode-beta 27 builds. WWDC26 session 339 covers them as the way a model package extends the protocol for new modalities and server side tool output. In the Xcode 27 GM they are gone along with the matching action on the executor generation channel. Is there any additional information as to what happened to custom segments, a replacement, etc? I don't see any mentions of this change in any release notes, though perhaps I'm looking in the wrong place.
Replies
1
Boosts
0
Views
188
Activity
5d
Private Cloud Compute off-ramp to third party solutions
Open Letter to Apple Leadership To: John Ternus, Chief Executive Officer Craig Federighi, Senior Vice President of Software Engineering Greg “Joz” Joswiak, Senior Vice President of Worldwide Marketing Apple Developer Relations & App Store Small Business Review Teams Subject: PCC & Developer Continuity: Implementing a Paid Tier for Private Cloud Compute (PCC) Dear John, Craig, Greg, and the Apple Developer Relations Team, I write to you as a new developer community member. While developing several Apple applications, I was glad to find deeply integrated applications through Apple Intelligence and the Private Cloud Compute (PCC) architecture that can be used to add features and capabilities to these applications. By eliminating early-stage cloud API friction, you gave indie developers the exact "on-ramp" needed to build incredible, localized AI tools. However, the current off-ramp mechanism built into the App Store Small Business Program enrollment is actively penalizing developer success. Your documentation outlines a rigid, unyielding pipeline for growing applications: "If any app subsequently exceeds the 2 million first-time downloads threshold, or the developer is no longer enrolled in the App Store Small Business Program, the developer will be notified and must migrate to an alternative solution within 6 months." While I know that it is highly unlikely that my downloads will exceed 2 million (shoot for the moon though, one never knows), since Apple does not distribute its frontier-tier server model weights, developers who reach this milestone will be forced to migrate their core features onto third-party infrastructure like AWS, OpenAI, or Microsoft Azure. This policy introduces a severe, counterproductive paradox into the Apple ecosystem: This will force successful devs to move to third party AI providers and away from Apple's tools. I am sure this is not a desired result at Apple. Or, it will have a chilling effect: developers will not use PCC if this a potential hurdle they might have to jump in the future. Why bother at all to begin with if this might be the end result. *Forced Migration Breaks Developer Continuity: Forcing growing apps off PCC means developers must completely swap out backend configurations. Instead of focusing on enhancing their apps for your new hardware, developers must waste critical engineering cycles rebuilding infrastructure on third-party clouds. Abandoning the Privacy Promise: Apple built its reputation on an uncompromising commitment to user privacy. PCC extends the secure enclave to the cloud. Forcing a developer to move their traffic to a third-party server means forcing users to trust external corporate entities with data that could have stayed inside Apple’s secure ecosystem. The "Success Tax": For mid-sized developers, the transition is a massive financial cliff. A commercial AWS instance capable of running an open-weight equivalent model introduces steep fixed baseline costs. My Proposal: A Predictable, Commercial Pay-As-You-Go PCC Tier after the limit, rather than an off-ramp to Apple's competitors: Instead of forcing growing developers onto AWS, Google Cloud, or OpenAI, Apple should allow developers to transition to a paid PCC commercial plan upon crossing the 2 million download or small business revenue thresholds. Whether structured as a metered developer API cost or an explicit tier integrated into Xcode and App Store Connect, developers want the option to pay Apple directly to stay on your hardware. This achieves your goal of preventing data centers from becoming a subsidized utility while ensuring our apps don't break when they go viral. Apple has always championed the idea that the best experiences happen when hardware, software, and services are vertically integrated. Forcing your most successful developers to sever that integration and hand their infrastructure over to external cloud providers at the exact moment they achieve scale undermines the ecosystem you’ve worked so hard to build. Please give us a path to grow with Apple, not away from it. Sincerely, The Apple Developer Community
Replies
0
Boosts
0
Views
326
Activity
6d
Error in Xcode console
Lately I am getting this error. GenerativeModelsAvailability.Parameters: Initialized with invalid language code: en-GB. Expected to receive two-letter ISO 639 code. e.g. 'zh' or 'en'. Falling back to: en Does anyone know what this is and how it can be resolved. The error does not crash the app
Replies
5
Boosts
2
Views
2k
Activity
1w
FoundationModels guided generation: empty token masks and severe slowdowns on macOS 27 betas 5, 6 and 7
Has anyone else hit this? We have a Mac app that uses FoundationModels with @Generable types for structured output. Starting with macOS 27 beta 5 every guided generation request began logging tokenizer errors and long structured requests slowed from seconds to minutes. Beta 6 and beta 7 both still have it. Filed as FB24310823 on August 11 with a full sysdiagnose and log captures, and we have appended evidence from each beta since. The signature is easy to check. Stream the log while your app generates: log stream --predicate 'subsystem == "com.apple.tokengenerationcore"' --style compact On an affected machine the inference service (TGOnDeviceInferenceProviderService, category guided) prints these two lines in matched pairs, thousands of times: Generated an empty mask at recognizer index N allowedTokenIDs is empty. Something is likely wrong with the tokenizer What we measured on beta 7 today: 9,008 of those pairs in about five and a half minutes of scanning. The errors start about one second into the first request after a fresh app launch, so it needs no warmup. Requests that normally finish in 4 to 12 seconds take 77 to 170 seconds or longer. On beta 5 we measured decode at roughly 0.3 tokens per second on the worst requests. Short requests still finish at normal speed but they emit the same errors while they run, and the quality of the structured content they return is degraded. On betas 5 and 6 we also saw repeated asset release errors for instruct_300m.tokenizer and the instruct_3b tokenizer saying the asset is not marked as in use. For what it is worth, a build that ran clean on beta 4 shows the same behavior on beta 5 and later with no app changes, and the same @Generable schema drives both the fast and the slow requests. But we know that does not rule out something on our side, and we would honestly be happy to learn this is our own bug since that would mean we can fix it. So two questions. Is anyone else seeing this since beta 5? And if you spot something we might be doing wrong on our end, sessions we should be recreating, schema patterns that stress the constrained decoder, anything at all, we would really appreciate the feedback. If it does turn out you are hitting the same thing, a Feedback referencing FB24310823 would help a lot. Thanks!
Replies
20
Boosts
1
Views
3.5k
Activity
1w
Exploring Apple Silicon + MLX for a persistent local AI companion architecture
I’m developing an independent project in Scotland called Isla Watson. The architecture is built around a simple principle: the model is replaceable; the identity is not. Long-term memory, persistent internal state and identity are designed to remain outside the foundation model, allowing local models to act as replaceable reasoning and language components without resetting the companion. I’m now exploring whether Apple Silicon and MLX could provide the long-term local compute platform for the system — including specialist Mac nodes for reasoning, memory, speech and perception, with distributed inference when larger models are required. A particular area of interest is whether multiple Macs can be used in two complementary ways: as independent specialist agents during normal operation; and as a distributed MLX inference group when a larger model exceeds the capacity of one machine. The first technical study I’d like to establish is a reproducible 1-node → 2-node baseline, measuring model capacity, unified-memory use, time to first token, generation throughput, power consumption, agent concurrency and distributed scaling efficiency. The wider research goal is to keep persistent identity and state independent from whichever foundation model is currently providing language and reasoning. I’d particularly value guidance from anyone working with MLX distributed inference, Thunderbolt/RDMA multi-Mac setups, or local agent architectures. I’ve also posted an architecture-level overview in the MLX GitHub community and have a one-page public brief available for anyone interested in the wider design. https://github.com/ml-explore/mlx/discussions/4482
Replies
1
Boosts
0
Views
348
Activity
1w
FoundationModels.LanguageModelError error -1 on visionOS simulator
I am getting FoundationModels.LanguageModelError error -1 when trying to use Foundation Models on the visionOS 27 simulator. It works on the iOS 27 simulator. Is this a bug with the visionOS 27 simulator specifically?
Replies
1
Boosts
0
Views
590
Activity
2w
Can Apple Foundation Models with PCC be used in a Developer ID distributed macOS app?
I am developing a third-party macOS application that uses Apple Foundation Models, including Private Cloud Compute (PCC). I would like to confirm the supported distribution requirements for this use case. Specifically: Can a third-party macOS application use Apple Foundation Models / PCC as part of its application functionality? Is PCC usage supported when the macOS application is distributed outside the Mac App Store using Developer ID signing and Apple notarization? Are there any additional entitlements, distribution requirements, or restrictions for PCC when distributing outside the Mac App Store? I intend to use only Apple's documented and supported APIs and will not attempt to bypass PCC availability, quota, entitlement, or other platform restrictions. Thank you.
Replies
3
Boosts
0
Views
1.3k
Activity
3w
Does prewarming a short-lived LanguageModelSession benefit a later session?
I’m building Summon (https://github.com/NakliTechie/summon), an open-source native macOS launcher that uses the on-device SystemLanguageModel. Summon creates a fresh LanguageModelSession for each query and attaches only the read-only tools relevant to that query. It currently calls prewarm() after the first keystroke using a temporary session, then creates a different session for generation. The documentation describes prewarm(promptPrefix:) as loading the resources required “for this session.” I would value guidance on four points: Is the prewarming benefit scoped to that exact LanguageModelSession instance? Does a later session using the same SystemLanguageModel receive any benefit? For an ephemeral launcher, is retaining one session preferable to creating a fresh session per query? Which Foundation Models Instrument signal identifies an ineffective prewarm or cache invalidation? Thank You Chirag
Replies
1
Boosts
0
Views
396
Activity
3w
Is programmatic use of fm serve from a distributed macOS app permitted?
I am developing a macOS developer tool that uses Apple Foundation Models, including the Private Cloud Compute (PCC) model. On macOS 27, the Foundation Models CLI provides fm serve, which exposes a local Chat Completions API, including: POST /v1/chat/completions My application communicates with this local API on the user's own Mac to provide agent-style development features. The Foundation Models CLI Legal Notice states: “You are also agreeing to not programmatically access or use Apple models through Apple software or services except as expressly permitted.” I would like to confirm whether using the local API intentionally exposed by fm serve from a third-party macOS application distributed to users is considered an expressly permitted use. The application would: use only the interfaces and endpoints officially exposed by the fm CLI; run fm serve locally on the user's Mac; use the user's own Foundation Models / PCC availability and quota; not bypass quota limits; not use private or undocumented APIs; not reverse engineer Apple services. Is this use of fm serve permitted for a distributed third-party macOS application? If so, are there any additional requirements or restrictions that developers should follow when distributing an application that integrates with fm serve in this way? Thank you.
Replies
1
Boosts
0
Views
535
Activity
4w
"Error Domain=ModelManagerServices.ModelManagerError Code=1026 \"(null)\" UserInfo={NSMultipleUnderlyingErrorsKey=(\n)}"
import Playgrounds import FoundationModels #Playground { do { let session = LanguageModelSession() let response = try await session.respond( to: "Explain SwiftUI in one sentence." ) print(response.content) } catch { print("Error: \(error)") } }``` I tested Foundation Models with this simple code, and it generated this error: "Error Domain=ModelManagerServices.ModelManagerError Code=1026 \"(null)\" UserInfo={NSMultipleUnderlyingErrorsKey=(\n)}" I tried restarting my Mac and Apple Intelligence, but that didn't work. What did work was updating Xcode and the simulators to the latest possible version.
Replies
2
Boosts
0
Views
193
Activity
Aug ’26
What signal should drive fallback for PrivateCloudComputeLanguageModel?
I'm building an app that uses PrivateCloudComputeLanguageModel as the primary inference tier with SystemLanguageModel as the fallback. The app is entitled (com.apple.developer.private-cloud-compute, granted and provisioned) and generations serve normally. My question is how a client should decide to fall back because in extended measurement, no public signal ever reflects the blocked state I actually hit. What I measured (macOS 27.0 beta, 26A5416b / Xcode 27 beta 27A5237l, entitled signed bundle constructing PrivateCloudComputeLanguageModel directly): Serving stopped mid-run with no leading signal: request N served normally (1.4 s), request N+1 threw LanguageModelError.rateLimited 494 ms later, at cumulative generation 786 for the day. 100% served → 100% refused between consecutive calls. Every quota signal read healthy the entire time: before, during, and after the block. Across 1,517 readings in a single day: quotaUsage.status = belowLimit, isApproachingLimit = false, isLimitReached = false, resetDate = nil, availability = .available. A preflight on these APIs cannot see the condition. The refusal is enforced locally after first contact: rejections return in ~230 ms vs ~0.9–1.4 s for served calls, so the client appears to cache the verdict rather than ask the server per-request. The trigger is a cumulative ledger, not a request rate: 501 generations at 33/min in one 15-minute sitting was fine, and a later arm sustained 39.7/min; two bursts of 16 concurrent at 5.0 and 5.2 req/s served 32/32; the count that tripped survived a process restart and a 4.9-hour idle gap. But it's not a fixed daily number either. 501 fast was fine earlier the same day; the trip came 285 requests later. A rolling window on the order of hours-to-a-day is consistent with this, but nothing here measures its length. Recovery: still blocked at +41 minutes (probes at +1/2/5/10/20/40 min all refused); fully recovered by +20 h with no intervention and no upgrade. Next day served normally from the first request. quotaLimitReached never occurred: not once in ~800 generations plus the blocked period. The wall is typed as the transient error while carrying what the documentation describes as daily quota semantics ("a person either waits for their usage quota to refresh or they upgrade"). limitIncreaseSuggestion is presence-constant: nil at process start, non-nil on every reading after first PCC contact (identical while fully serving and while fully blocked) so its presence can't gate an upsell affordance. The same signals-read-healthy-while-refusing divergence also reproduces against the developer-tool pool (fm serve), which I've reported separately (FB24273854 covers quota exhaustion surfacing there as a generic server_error/500 while /health reports the model available). Questions: Is attempt-and-classify the intended contract? Given that no preflight can observe the blocked state, should a client simply issue the request, treat the typed error as authoritative, and route to SystemLanguageModel? And is the ~230 ms local fail-fast on the blocked path contractual (cheap and safe to probe) or incidental? This is the one that decides how I ship; the rest are diagnostics behind it. What does quotaUsage actually track, and at what granularity? I have driven the entitled app-tier path to a hard block and the developer-tool pool to exhaustion, and no field ever moved. Is there any consumption pattern that moves isApproachingLimit / isLimitReached / resetDate? If the intended answer is "only the per-person daily quota, which these volumes never approached," what is the wall I am hitting at ~786 cumulative, and why does it surface as rateLimited? Should rateLimited and quotaLimitReached drive different client behavior — and which one is the daily allowance in practice? The documentation distinguishes rate limiting ("wait a period and retry") from daily exhaustion ("wait for refresh or upgrade"), but what I observe is the transient-typed error carrying the multi-hour ledger semantics. Concretely: what retry cadence is recommended after rateLimited (my measured recovery horizon was somewhere between 41 minutes and 20 hours. My current design stays on the on-device model and re-probes PCC at a low fixed interval rather than per-request)? And under what condition is resetDate ever populated, given it was nil even while blocked? (Smaller, design guidance): my app can generate a few hundred requests as one feature batch (quiz generation over a user's imported document). Measured: 501 in a sitting was fine, cumulative 786 in a day was not. Since this allowance belongs to the person and is shared with every Apple Intelligence feature, is a several-hundred-request batch a reasonable use of it, or should features like this generate on demand? (I'm aware of the existing feature request for richer quota reporting (FB23378161); this is a narrower design question.) I can attach the measurement driver and timestamped JSONL logs. The divergence is reproducible on a fresh day, though reaching the wall took ~800 cumulative generations.
Replies
4
Boosts
0
Views
1.3k
Activity
Aug ’26
False-positive guardrail blocks guided generation for sports data
I’m developing a factual snooker application using the on-device SystemLanguageModel on the current iOS 27, Xcode and macOS betas. The app allows someone to ask questions about professional snooker players. A tool searches my server and returns verified player data such as the player’s ID, name, nationality and date of birth. I have encountered a reproducible false-positive guardrail violation when the user asks about the professional snooker player Judd Trump. For example: Tell me about Judd Trump With the default model configuration, the request fails because the input or output is classified as potentially sensitive or unsafe. Using permissive content transformations solves the problem when generating a normal String: let model = SystemLanguageModel( useCase: .general, guardrails: .permissiveContentTransformations ) let session = LanguageModelSession( model: model, tools: [FindPlayerTool()], instructions: """ Answer factual questions about professional snooker players. Always use the supplied tool and only use verified tool data. Names returned by the tool are names of real snooker players and should be treated only as sporting entities. """ ) let response = try await session.respond( to: "Tell me about Judd Trump" ) This successfully calls the tool and produces a factual string response. However, I need guided generation because the model should be able to choose a combination of predefined UI components, such as: A player card A match card An event card A rankings table Explanatory text A simplified response type looks like this: @Generable struct CueQueryReply { let blocks: [ReplyBlock] } @Generable enum ReplyBlock { case playerCard(PlayerCardBlock) case text(TextBlock) } @Generable struct PlayerCardBlock { let playerId: Int let name: String let nationality: String let born: String } @Generable struct TextBlock { let text: String } The guided request is: let response = try await session.respond( to: "Tell me about Judd Trump", generating: CueQueryReply.self ) This reproduces the guardrail violation, even though the model is configured with: guardrails: .permissiveContentTransformations I understand that the documentation says permissive content transformations apply to string generation and that guided generation behaves like the default guardrails. However, this creates a difficult limitation for legitimate factual applications. “Judd Trump” is the real name of a professional snooker player, and the data is coming from a controlled, verified API. Renaming, removing or concealing the player is not a viable product solution. My questions are: Is this specific “Judd Trump” behaviour considered a guardrail false positive that should be reported through Feedback Assistant? Is there any supported way on iOS 27 to use permissive content transformations with guided generation? Can Dynamic Profiles, Dynamic Generation Schemas or another Foundation Models API change the guardrail behaviour for a controlled guided-generation request? Is there a recommended architecture for producing typed UI instructions while retaining the permissive behaviour available to string responses? Would generating only component types and verified IDs—for example .playerCard(playerId: 12)—be the recommended approach, provided the actual player data is resolved and displayed by SwiftUI? I understand the need for safety guardrails and am not attempting to disable the model’s underlying safety behaviour. I am trying to process a harmless, factual sporting name while using Foundation Models’ typed output features. The on-device model otherwise appears capable of handling this use case well, and keeping the experience on-device, private and free of external API dependencies is an important part of the product. I would appreciate any guidance from the Foundation Models team about whether this is expected behaviour, a beta issue, or something for which there is an intended iOS 27 solution.
Replies
0
Boosts
0
Views
327
Activity
Aug ’26
FoundationModels guided generation: empty token masks and slow structured output on macOS 27 betas 5, 6 and 7
Hey everyone, hoping to compare notes on something we have been chasing since beta 5. We have a Mac app that uses FoundationModels with @Generable types for structured output. Starting with macOS 27 beta 5, guided generation requests began logging tokenizer errors and our longer structured requests slowed from seconds to minutes. We are still seeing the same thing on beta 6 and beta 7. We filed it as FB24310823 on August 11 with a sysdiagnose and log captures. The signature is easy to check if you want to see whether your machine does it too. Stream the log while your app generates: log stream --predicate 'subsystem == "com.apple.tokengenerationcore"' --style compact On our machine the inference service (TGOnDeviceInferenceProviderService, category guided) prints these two lines in matched pairs, thousands of times: Generated an empty mask at recognizer index N allowedTokenIDs is empty. Something is likely wrong with the tokenizer Some numbers from beta 7 today: 9,008 of those pairs in about five and a half minutes. The errors start about one second into the first request after a fresh app launch. Requests that normally finish in 4 to 12 seconds take 77 to 170 seconds or longer. On beta 5 we measured decode at roughly 0.3 tokens per second on the worst requests. Short requests still finish at normal speed but they emit the same errors while they run, and the structured content they return looks degraded to us. On betas 5 and 6 we also saw repeated asset release errors for instruct_300m.tokenizer and the instruct_3b tokenizer saying the asset is not marked as in use. For what it is worth, a build that ran clean on beta 4 shows the same behavior on beta 5 and later with no app changes, and the same @Generable schema drives both the fast and the slow requests. But we know that does not rule out something on our side, and we would honestly be happy to learn this is our own bug since that would mean we can fix it. So two questions. Is anyone else seeing this since beta 5? And if you spot something we might be doing wrong on our end, sessions we should be recreating, schema patterns that stress the constrained decoder, anything at all, we would really appreciate the feedback. If it does turn out you are hitting the same thing, a Feedback referencing FB24310823 would help a lot. Thanks!
Replies
4
Boosts
0
Views
434
Activity
Aug ’26
Foundation Models tool-calling differs significantly between iPhone 16 and iPhone 17 Pro Max
I'm seeing a reproducible difference in Foundation Models behavior between an iPhone 16 and iPhone 17 Pro Max, both running iOS 27.0 beta 6. My pipeline is roughly: Input → model generation → tool call → validation/correction → structured output Each test starts with a fresh model session. I run the same 50-case dataset on both devices with the same app build, prompt, tool, data, and execution order. The main difference is not just speed: the iPhone 16 consistently makes many more tool calls, which causes the session context to grow until some runs exceed the available context window. Both devices report a context size of roughly 4,096 tokens. Metric iPhone 16 iPhone 17 Pro Max Completed 30/50 49/50 Total tool calls 222 67 Mean calls/run 4.44 1.34 Max calls/run 22 2 Verified outputs 75.1% 91.0% The pattern is very consistent across repeated runs. On the 17 Pro Max, most requests converge after 1–2 tool calls. On the iPhone 16, some requests enter longer tool/correction loops and eventually fail because the context grows too large. I can probably mitigate this by limiting tool calls or changing the prompt, but I'd like to understand the underlying behavior. Is this difference expected across supported devices even on the same OS version? In particular: Can different on-device model variants be used depending on hardware? Is there a way to determine which model/profile a SystemLanguageModel session is using? Should tool-selection behavior be expected to remain reasonably consistent across devices? Would this be worth filing as a Foundation Models regression during the beta?
Replies
2
Boosts
0
Views
882
Activity
Aug ’26
Rate limit from SensitiveContentAnalysisML never lifts when using PCC
I keep running into rate limit issues that never go away while the app is running when trying to analyze images using Private Cloud Compute in iOS 27 Beta 6. After 20 or so images, I get a rate limit error from PCC, but the actual rate limit seems to come from SCML (see relevant log entries below). Once this happens, any attempted PCC requests result in an immediate rate limit error, no matter how long I wait, so long as the app is running. If I kill the app and relaunch, I no longer receive the rate limit error (unless, again I run several images through in succession). So it seems like once this state is triggered, you are stuck in it until you kill and relaunch the app. Has anyone else encountered this or have a workaround? I've filed a feedback already: FB24419603 Passing along Client rate limit exceeded, try again later in response to ExecuteRequest Passing along Client rate limit exceeded, try again later in response to ExecuteRequest systemPromptID failed for task textSafety: Rate limited. Wait a little bit and then try again.::Rate limited. Wait a little bit and then try again.: Client rate limit exceeded, try again later::Client rate limit exceeded, try again later; prompt template also not found: Rate limited. Wait a little bit and then try again.::Rate limited. Wait a little bit and then try again.: Client rate limit exceeded, try again later::Client rate limit exceeded, try again later End sanitizeText with error: Error Domain=com.apple.SensitiveContentAnalysisML Code=15 "SCML.CombinedTextSanitizerBackend.BackendError("SafetyGuardrailTextSanitizerBackend"): Rate limited. Wait a little bit and then try again." UserInfo={NSLocalizedDescription=SCML.CombinedTextSanitizerBackend.BackendError("SafetyGuardrailTextSanitizerBackend"): Rate limited. Wait a little bit and then try again., NSUnderlyingError=0x11a632ee0 {Error Domain=SensitiveContentAnalysisML.CombinedTextSanitizerBackend.BackendError Code=1 "SCML.CombinedTextSanitizerBackend.BackendError("SafetyGuardrailTextSanitizerBackend"): Rate limited. Wait a little bit and then try again." UserInfo={NSUnderlyingError=0x11a5dd380 {Error Domain=com.apple.GenerativeFunctionsFoundation.GenerativeError Code=1010000 "Rate limited. Wait a little bit and then try again."}, NSLocalizedDescription=SCML.CombinedTextSanitizerBackend.BackendError("SafetyGuardrailTextSanitizerBackend"): Rate limited. Wait a little bit and then try again.}}}
Replies
3
Boosts
0
Views
182
Activity
Aug ’26