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.2k
Aug ’25
On-device model refuses to classify harmless grief-related text (LanguageModelError.refusal), but will summarize it
Hi, A harmless sentence about a grief support group makes the on-device model throw LanguageModelError.refusal when it's asked to classify it. In the same session, the same sentence is summarized without complaint, and the same sentence with "grief" swapped for something neutral classifies fine. Environment: Mac mini M5 Pro, macOS 27.2.1 (26B131), Xcode 27.2 (27B52), AFM 3 Core Advanced. Also reproduced on iOS 27.2 and visionOS 27.2 simulators. Minimal repro (run as written, twice, same result): @Generable enum SafetyLabel: String { case safe, sensitive, concerning, unsafe } let text = "Our support group meets on Thursdays to talk about coping with grief." // Throws LanguageModelError.refusal ("May contain sensitive content") let classifier = LanguageModelSession(instructions: "Classify the text by content safety.") _ = try await classifier.respond(to: text, generating: SafetyLabel.self) // Works: "Support group meets Thursdays for grief coping." let summarizer = LanguageModelSession() _ = try await summarizer.respond(to: "Summarize in five words: \(text)")Results, same session: "…coping with grief." → classify (@Generable enum): refusal; summarize (plain text): works "Our book club meets on Thursdays to talk about mystery novels." → classify: safe; summarize: works Same result with SystemLanguageModel(guardrails: .permissiveContentTransformations). It's refusal, not guardrailViolation. In a fuller classifier (four classifiers with calibrated label descriptions) it was also refused under greedy and default sampling, with a purpose line in the instructions, and with SystemLanguageModel(useCase: .contentTagging). A second case, likely the same trigger: the Little Women review in Apple's own Book Tracker sample (Using Evaluations to evaluate an intelligent feature). It recounts Beth's death, and tagging it with the sample's instructions, .permissiveContentTransformations guardrails and a @Generable tag array throws LanguageModelError.refusal on both .general and .contentTagging, in well under a second, on two Macs (M3 Max and M5 Pro). The other 12 reviews in the sample tag fine. I haven't tested whether the two share a trigger. So grief or death in otherwise harmless text seems enough for the model to refuse structured classification and tagging, the kinds of tasks the content-tagging use case is for. Questions: Is this expected? It reads like a false positive: nothing in the text is harmful, and the model will summarize it. Is there a supported way for an app to classify or tag text like this on device, for example for a support or journaling app where grief is a normal topic?
2
0
314
1d
Guided generation stream goes silent for ~2.5 min, then contextSizeExceeded, after an unescaped quote inside a string (FB25591600)
Hi everyone, I've been chasing a stall in streamed guided generation that took me a while to pin down. I'm hoping someone here has seen it too, or can tell me whether it's expected. My setup: macOS 27.2.1 (26B131), Xcode 27.2, SystemLanguageModel.default (AFM 3 Core Advanced, 8,192-token context), greedy sampling, with the schema included in the prompt. What happens streamResponse(to:generating:includeSchemaInPrompt:options:) delivers 16 snapshots in the first ~4 s, one per 10 output tokens. Then nothing arrives for ~155 s: no snapshot and no error. At ~159 s one more snapshot arrives, and the stream immediately throws LanguageModelError.contextSizeExceeded: "Content contains 8193 tokens, which exceeds the maximum allowed context size of 8192." The prompt was 896 tokens, and the last snapshot reports 170 output tokens. That means about 7,100 tokens were generated without ever reaching a snapshot. The Foundation Models Instrument reports deltasCount: 730 for this response. What the last snapshot shows The field is a [String] of short bullets. In the final snapshot, the second bullet is a closed string: "The generalist used ". GeneratedContent(json:) accepts an escaped quote, single quotes, and a closed string followed by whitespace. It rejects a closed string followed by more text: try GeneratedContent(json: #"{"justification": ["The generalist used "angry"#) // Encountered content that cannot be completed into valid JSONIt looks as if the model wrote an unescaped " to start a quotation. That quote closed the string, and nothing after it could be parsed until the context window filled. Every freeze I could inspect stopped just before the model quoted someone ("The generalist's ", "The generalist stated "). None of the 199 finished responses I checked contained a double quote. On a run where the same input finished, the model wrote the word with single quotes ('angry'). The failure follows a single greedy path. In my app this input stalls on every cold request and finishes on every prewarmed one, while other inputs do the opposite. A standalone repro where this is the process's only request stalls with and without prewarm(). What I tried Bounding the array with @Guide(..., .count(2...4)) removed the stalls on the path my app uses: 0 of 34 panels and 0 of 27 end-to-end runs, down from 2 of 27. The same input still stalls on the other path. The instruction "Paraphrase the panelists; don't quote them." removed the stalls, but it cost accuracy on another field. The instruction "If you quote a panelist, use single quotes." made things worse: 9 stalls in 68 requests instead of 1. My current workaround: if no snapshot arrives for 15 s, cancel the stream and show an error. After cancellation, session.isResponding was false within a second. Questions Is an unescaped " inside a string field expected from guided generation? Or should constrained decoding prevent or escape it? Once the output can no longer be parsed, could the stream fail right away instead of generating until the window is full? Is there a supported way to detect this on the client other than a timeout? And does canceling the consuming task reliably stop generation on the model side? I've attached a self-contained repro (one Swift file, plus console output for the stalling run and the parser cases) to FB25591600. I'm happy to share more details or run anything that would help. Thanks for taking a look!
1
0
246
1d
SampleGenerator sends the Prompt's debug description to the on-device model, and every request carries the whole dataset
Hi, I'm running SampleGenerator from the Evaluations framework with SystemLanguageModel.default in place of PrivateCloudComputeLanguageModel, otherwise as in the Book Tracker sample's BookSampleGenerator/main.swift. Same prompt, instructions, validator and 13 seed reviews. Environment: Mac mini M5 Pro, macOS 27.2.1 (26B131), Xcode 27.2 (27B52), AFM 3 Core Advanced (8,192-token context). Repro: equivalent to the Book Tracker sample's BookSampleGenerator/main.swift with PrivateCloudComputeLanguageModel() replaced by SystemLanguageModel.default and targetCount set to seeds + 20. I ran it from a test target rather than the sample's own target. Attached: the [SampleGenerator] log from one run. let generator = SampleGenerator<ModelSample<BookTags>>( Prompt("Generate diverse range of book reviews and corresponding tags. ..."), samples: seeds, // the sample's 13 reviews targetCount: seeds.count + 20, sessionProvider: { LanguageModelSession(model: SystemLanguageModel.default, instructions: generatorInstructions) }, validator: { sample in /* the sample's four rules */ true } ) for try await sample in generator.run() { /* ... */ }1. The model receives the Prompt's debug description, not its text. The prompt segment in each session's transcript (and the [SampleGenerator] Prompt being sent to model: log line) begins: Prompt(components: Swift.AsyncThrowingStream<FoundationModels.Prompt.Component, Swift.Error>(context: ...), synchronousComponents: Optional([FoundationModels.Prompt.Component.text(FoundationModels.Prompt.Text(value: "Generate diverse range of book reviews..."))]))The examples that follow are also printed with String(describing:), including module and type names (MyModule.MySample(review: "...", tags: [...])). 2. Every request carries the full text of every sample so far. After the prompt comes "IMPORTANT: Generate N completely new examples with different starting prompts than any of these existing samples:", followed by every sample's full prompt text, seeds included, not just the selected examples. The request therefore grows with the dataset. On an 8K window the generator overflows, halves the batch, opens a new session, and finally logs Context window exhausted at batch size 1 twice in a row. Stopping. In every run that asked for 20 new samples (about ten runs), the dataset stopped at 15–22 samples in total, seeds included. run() then finishes normally, so the caller only finds out by counting. 3. With ModelSample<T>, the model is asked for every field, including instructions and TrajectoryExpectation. The on-device model fills them in. Every sample kept in two runs (9 of 9) had a writing brief in instructions ("Write a sweeping, reflective review…"), and 4 of 9 had invented tool-call expectations. In another run, all 6 samples had a brief where the review belongs ("Create 5 diverse book entries…"). The sample's validator passes these, since a brief is over 100 characters too. A custom @Generable type conforming to ModelSampleProtocol with only review and tags avoids this. 4. Deduplication is exact-match only. The model returns seed reviews with a sentence cut or added, and near-copies of its own samples with one word changed. Both pass. I check for shared 8-word runs in the validator instead. 5. Minor: samples includes the seeds, as documented, but the sample's main.swift prints allSamples.count as the number of new samples. Questions: Is (1) intended, or should the prompt be passed through as text? Is SampleGenerator meant to support the on-device model? If so, could the existing-samples list be limited (to the selected examples, or by token budget)? Could run() report that it stopped short of targetCount, for example by throwing or exposing a stop reason?
0
0
226
3d
: Acceptable use check: Mac coding agent for Xcode that uses SystemLanguageModel and a custom LanguageModel provider
Hi, I’m preparing a macOS app for the Mac App Store and want to confirm it meets the Foundation Models acceptable use requirements and the Developer Program License Agreement before I submit. What the app does It’s a menu-bar app plus a sandboxed helper that Xcode 27 launches as a coding agent over ACP (Settings > Intelligence). The agent runs a LanguageModelSession in-process. It uses either SystemLanguageModel.default or a custom LanguageModel conformance that streams from an MLX model the user has downloaded. With Apple’s model, the agent gets only Xcode’s read and search tools. When the guardrails block a request, the app shows the error to the user and doesn’t retry or rephrase the prompt. The app also runs a local OpenAI-compatible HTTP server on 127.0.0.1 only, protected by a key. This server serves the downloaded MLX model only, never Apple’s model. Third-party agents the user installs (for example OpenCode) can point at it. Questions Is using SystemLanguageModel inside a coding agent that Xcode launches over ACP acceptable under the acceptable use requirements? Is it acceptable to ship a custom LanguageModel provider backed by a downloaded open-weight model alongside Apple’s model in the same app? Since the local HTTP server only serves the MLX model, can you confirm this doesn’t count as “exposing” the Foundation Models framework to other apps? And if I later wanted to route third-party agents to Apple’s on-device model, would that be permitted at all? Does the developer agreement require specific guardrails beyond the framework’s own for this kind of app? If so, where is that documented? Thanks happy to to share more detail on the architecture if it helps.
0
0
249
5d
Pending Private Cloud Compute entitlement: status and account conversion questions
I submitted a Private Cloud Compute entitlement application around October 17, 2026 for Konote, App Store Connect app ID 6823726856. It is still pending. I've also submitted Feedback: FB25522199. We're enrolled in the App Store Small Business Program and are far below two million first-time downloads, with only TestFlight testers so far. We meet the published eligibility criteria on those points. Konote records and transcribes meetings on device, and audio is never sent to us or any AI service; when iCloud sync is enabled, audio syncs only to the user's own devices with end-to-end encryption. We plan to use PCC for long meeting summaries because hour-long transcripts exceed the on-device model's context window; PCC is central to our planned release's privacy design. My individual-to-organization membership conversion, submitted around October 20, is also pending. Could you confirm whether the entitlement application is queued or missing information, and whether a technical explanation would help? I'd also appreciate confirmation of whether the pending conversion blocks review and whether I need to resubmit after it completes. Eric
0
0
260
1w
Recognizing Handwritten Mathematics with the On-Device Language Model
Hello, I'm currently working on an iPad app that combines the flexibility of handwritten notes with advanced mathematical computation, including linear algebra, calculus, and solving systems of equations. One of its core features is to recognize handwritten mathematical notation and converting it into a structured representation that can subsequently be parsed and evaluated. For this, I want to use the SystemLanguageModel() together with Guided Generation. My approach I created a custom set of "MathToken" enums using @Generable. The idea is to let the model recognize mathematical handwriting and directly return an array of these tokens. The tokens represent both basic mathematical elements (integers, identifiers, operators, etc.) and more complex structures such as matrices, vectors, function applications, derivatives, integrals, and systems of equations. The resulting tokens are then passed to a parser, which constructs a structured statement that can eventually be evaluated. For handwriting input, I exported the relevant content from PaperKit/PencilKit as a UIImage and attached it to the LanguageModelSession. I've attached both the MathToken definition and my current prompting approach. The problem Unfortunately, the recognition accuracy is not yet sufficient for a reliable user experience. I've experimented with different prompting strategies: Very short and general instructions. More detailed descriptions what to watch for Explicit rules explaining when each token should be used However, none of these approaches has significantly improved the results. The model frequently selects tokens that contradict the instructions it was given. Some examples: The model sometimes generates an identifier containing a number instead of using integer or real. Instead of using structured tokens like functionApplication, it uses identifiers and parentheses instead For ordinary multiplication, such as 3 × 5, it sometimes generates the product token, which is specifically intended for mathematical product notation (capital Pi). These are not ambiguous cases. I've explicitly described the distinctions in my instructions, yet the model still makes these mistakes. I'm aware that prompting and model context size have their limitations, so I'm trying to understand whether my overall approach is appropriate. Questions Prompting: Is there a better way to guide the model towards consistently selecting the correct enum cases? Guided Generation: Is an enum with many associated values and recursively nested [MathToken] arrays a suitable structure for Guided Generation? Could the complexity or structure of my MathToken definition itself be contributing to the problem? How could a more suitable structure look like (which I could transform into the MathTokens)? Model capabilities: Is recognizing handwritten mathematics and mapping it directly to such a structured representation simply too complex a task for the on-device model in its current form? Architecture: Could this problem benefit form splitting it into multiple stages? What stages would you recommend? I'd be particularly interested in understanding whether there are any known limitations or recommended patterns when using Guided Generation for tasks involving complex, recursively structured output. I've included my current implementation and the MathToken definition below/attached for context. Thank you for your time and any suggestions!
2
1
70
1w
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?
8
1
4.6k
1w
iOS 27.3 beta: Apple Intelligence works in system UI, but Foundation Models returns deviceNotEligible on a mainland China iPhone Duo
Hello Apple team, After updating an iPhone Duo purchased in mainland China to iOS 27.3 beta, Apple Intelligence appears to be available at the system level: Apple Intelligence is visible in Settings. Pressing and holding the side button successfully activates the system assistant. The multicolored glow appears around the edges of the screen while using it. However, when developing an app using the Foundation Models framework, the on-device model reports that this device is not eligible, and an actual generation request is also rejected. Environment Physical device: iPhone Duo (iPhone19,4) iOS version: 27.3 beta OS build: 24C5037i Build toolchain: Xcode 27.1 / iPhoneOS 27.1 SDK Diagnostic app deployment target: iOS 26.0 Developer Mode: enabled Reported locale: zh-Hans_HK Minimal reproduction We built and installed a separate, minimal diagnostic app to rule out our main app’s business logic. It reads the model availability and attempts one request containing only synthetic test text: let model = SystemLanguageModel.default print(model.availability) print(model.supportsLocale(Locale(identifier: "zh_CN"))) do { let session = LanguageModelSession( instructions: "Reply briefly. This is a synthetic device diagnostic." ) let response = try await session.respond(to: "Reply with OK.") print(response.content) } catch { print(String(reflecting: type(of: error))) print(String(describing: error)) }Results on the physical device availability: unavailable( FoundationModels.SystemLanguageModel.Availability .UnavailableReason.deviceNotEligible ) supportsLocale(zh_CN): true error_type: FoundationModels.SystemLanguageModel.Error error: This device does not support Apple Intelligence.The availability remains deviceNotEligible after the request. Could you please clarify: Does the mainland China Apple Intelligence rollout in iOS 27.3 beta include third-party access to the on-device model through Foundation Models? Is this a known issue or an expected limitation of this beta? Is building with Xcode 27.3 / the iOS 27.3 SDK required for this access? Does enabling the Qwen extension affect Foundation Models eligibility, or is that extension independent of SystemLanguageModel.default? We can provide the minimal diagnostic project and additional diagnostics if needed. Thank you.
0
0
297
1w
FoundationModels API Availability, deviceNotEligible Error on CH/A Hardware, and Roadmap Timeline (Team ID: NVQ5CF8F2X)
Dear Apple Developer Relations & Technical Support Team, I am an iOS developer based in Mainland China. We are currently developing an on-device AI-powered translation assistant for reading original English books, targeted at a global market. We have upgraded our development setup to Xcode 27.3 Beta and iOS 27.3 Beta. When attempting to invoke the FoundationModels API on an iPhone 15 Pro (Mainland China SKU: MTQA3CH/A), the system fails to initialize and returns the following diagnostics: Availability: unavailable(FoundationModels.SystemLanguageModel.Availability.UnavailableReason.deviceNotEligible) Raw Error: FoundationModels.SystemLanguageModel.Error Code 0 ("The assets required for the session are unavailable.") Language Support: supportsLocale(zh-Hans): true Considering that the iPhone 15 Pro hardware (A17 Pro chip) meets the necessary performance criteria and the framework reports that Simplified Chinese is supported, we would like to consult with you on the following key questions: Current Availability & Expected Release Timeline: Is the FoundationModels API currently completely disabled for Mainland China hardware models (CH/A)? If it is currently restricted, when is it expected to become available for developers and users in Mainland China? If there is an established roadmap or target release schedule, could you please share a specific timeline so we can plan our product roadmap and release cadence accordingly? Model Strategy for Mainland China: In Mainland China, will Apple eventually enable the standard FoundationModels API seamlessly under the hood, or will a different, locally-partnered/compliant AI model be required to satisfy regional regulations? Should developers expect the existing FoundationModels API to unlock in the future, or should we design a separate, alternative AI backend specifically for the Mainland China market? Testing Solutions for Global App Deployment: Since our application is intended for global release outside Mainland China, what is the official recommended workflow for China-based developers using CH/A devices to test and debug FoundationModels features during this beta phase (e.g., using Xcode Simulator, overseas non-CH/A hardware, or a developer sandbox/allowlist)? Environment & Diagnostic Details: Developer Team ID: NVQ5CF8F2X Xcode Version: Version 27.3 beta (Build: 27C5020n) iOS Version: Version 27.3 (Build: 24C5037i) Test Device: iPhone 15 Pro (Hardware: iPhone16,1, Model: MTQA3CH/A) Diagnostic State: isAvailable = false, deviceNotEligible Error: Domain=FoundationModels.SystemLanguageModel.Error, Code=0, "The assets required for the session are unavailable." Thank you very much for your time and assistance. We look forward to hearing your insights. Sincerely, Kai
0
1
333
2w
foundation-models-utilities 1.1.0: Skill(allowsDeactivation: false) can still be deactivated by the model
I'm using foundation-models-utilities 1.1.0 (tag at 6c5a04c). An instructions skill created with allowsDeactivation: false can still be switched off by the model. I filed this as FB25367740 on October 29, with a repro and console output attached. The measurements below are from 1.1.0-beta1 (cc3820d). The only commit between 1.1.0-beta1 and 1.1.0 changes README.md and SKILL.md, so the stable release behaves the same. Setup One instructions skill, metric-units, with allowsDeactivation left at its default, false. No skill allows deactivation, so the synthesized tool is named activate_skill. Three prompts in one session, with .greedy sampling: "From now on, give every measurement in metric units." "Keep using metric units, please. How far is 3 miles?" "Switch metric mode off." Expected metric-units stays active through all three turns. Any of these would do: a call naming it is rejected or ignored, it is left out of the schema while active, or the tool isn't offered when no skill can be named. Actual (identical across repeated runs) Default, strictSchema: false: Turn 1: activate_skill {"skill": "metric-units"} → "Successfully activated skill: metric-units". Active: ["metric-units"]. Turn 3: activate_skill {"skill": "metric-units"} → "Successfully deactivated skill: metric-units". Active: []. The model answered, "Metric mode is now off." strictSchema: true: Turn 2: with the skill active, the argument's enum is empty ("enum": []), but the tool is still offered. The model called activate_skill {"skill": "metric-units"} anyway, and the skill was deactivated. Active: []. Turn 3: it called the tool again and re-activated the skill. The model answered, "Metric mode is now active again." Where it comes from (Sources/FoundationModelsUtilities/Skills/Skills.swift at 1.1.0) The onCall closure toggles any instructions skill without reading that skill's allowsDeactivation: case .instructions: if activations.isActive(skill.name) { activations.deactivate(skill.name) skill.deactivate() } else { activations.activate(skill.name) skill.activate() }ToggleSkillTool.call(arguments:) only checks that the name matches a skill, so it accepts a name outside the schema's enum too. The schema has a related gap. In ToggleSkillTool.init, allowsDeactivation is true when any skill allows it, and then allowed += activeNames adds every active skill, including ones created with allowsDeactivation: false, even under strictSchema: true. I found this one by reading the source. It isn't in FB25367740, and I haven't measured it. Possible fix Check the skill's own allowsDeactivation before deactivating it, and return a message saying it stays active. Add to allowed only the active skills that allow deactivation. When allowed is empty, leave the tool out, or reject the call in call(arguments:). Environment Model: on-device SystemLanguageModel.default Package: foundation-models-utilities 1.1.0-beta1 (cc3820d); the Skills code is unchanged in 1.1.0 macOS 27.2 (26B123), MacBook Pro (Mac15,9), Apple M3 Max, Xcode 27.1 (27A9275)
0
0
280
2w
foundation-models-utilities 1.1.0-beta1: README and bundled SKILL.md inconsistencies
I've been working with foundation-models-utilities and noticed a few places where the README and bundled SKILL.md don’t match the code. I’m using version 1.1.0-beta1 (commit cc3820d). Here’s what I found: SkillActivations collection conformance. The README says it conforms to RandomAccessCollection. The implementation conforms to Sendable and Observable, and exposes activeSkillNames and isActive(_:) instead. Package dependency version. The installation example uses from: "1.0.0". With only prerelease tags available when checked, that stable version requirement does not resolve. An example referencing a published beta would help. Local server URL. Both ChatCompletionsLanguageModel examples use http://localhost/v1:8000. For port 8000 and base path /v1, the URL should be http://localhost:8000/v1; the existing example places :8000 in the path. SwiftPM traits and conditional compilation. The bundled SKILL.md describes ChatCompletions, Skills, and History traits, and says the sources use matching #if gates. However, Package.swift declares no traits, and those gates are absent from the sources. Could you update the documentation to match this release? The bundled agent skill is particularly relevant because coding assistants may otherwise generate configuration for traits the package does not provide.
2
0
600
2w
Foundation Models availability in mainland China
Hi, Apple recently announced that Apple Intelligence will launch in mainland China with iOS 27.3. Will the Foundation Models framework also become available to third-party apps in mainland China? If so, will it use the new iOS 27 Apple Foundation Model or an older version? Will the new capabilities and Private Cloud Compute also be supported? Thanks!
2
0
390
2w
PCC rate limits and blocking Siri AI as a result
Hello, I have PCC deployed in my 3 apps and my testing for these apps has caused me to hit the rate limit many times. When this rate limit is hit, Siri AI (as well as HomeKit PCC features) stops working completely for me until the rate limit is reset. I have been forced to scale back PCC and testing in my apps as this situation is quite opaque. My logs say I’m being rate limited when using PCC in these cases. Example log I see: 10:51:47.407 | RemoteManager executing remote streaming request 10:51:47.407 ModelCatalog | Looking up asset bundle com.apple.fm.language.instruct_server_v2.fm_api in Model Catalog 10:51:47.410 DaemonSession | Asset com.apple.fm.language.instruct_server_v2.fm_api has inference providers: 10:51:47.410 DaemonSession | - private-ml-client 10:51:47.411 ExecutionGroup | executing request C9B08798-6D68-4819-83C9-89B2EF5278C4 10:51:47.431 InferenceProviderConnection | InferenceProvider requestInference (C9B08798-6D68-4819-83C9-89B2EF5278C4) finished 10:51:47.431 RemoteManager | Request failed on private-ml-client with error: InferenceError::rateLimited::PrivateCloudComputeError: deniedDueToUserDeviceRateLimit, falling back 10:51:47.431 RemoteIPC Tasks | Failed to execute remote streamingRequest with error: InferenceError::rateLimited::PrivateCloudComputeError: deniedDueToUserDeviceRateLimit 10:51:56 modelmanagerd [com.apple.modelmanager:RemoteIPC Tasks] Failed to execute remote oneShotRequest with error: InferenceError::rateLimited::PrivateCloudComputeError: deniedDueToUserDev 11:23:39 privatecloudcomputed [com.apple.privatecloudcompute:RateLimiter] rate limit applied from cached denials What are the rate limits? How many requests a day? Per second? Also, I subscribed to the highest iCloud storage tier in hopes of higher rate limit but there doesn't seem to be any change. https://support.apple.com/en-us/127901 This issue started when iOS27 became publicly available - I was never rate limited when on the iOS27 beta.
4
0
2.1k
3w
PCC refuses factual extraction about shipwrecks (FB25314866)
We filed FB25314866. PrivateCloudComputeLanguageModel refuses to extract basic facts (name, year, depth, coordinates) from Wikipedia and dive-shop pages about warship wrecks, including a destroyer scuttled as an artificial reef. The input passes (a "reply OK" variant is answered); the output is filtered with "Streamed response may contain sensitive or unsafe content", on respond() and streamResponse alike. Guided generation passes for some of the same inputs. SystemLanguageModel offers Guardrails.permissiveContentTransformations for this kind of extraction, but the PCC model has no guardrails parameter. Is support planned, and is there a recommended approach meanwhile? About the 11 attachments filed in Feedback Assistant: Each file is the Data returned by LanguageModelSession.logFeedbackAttachment(sentiment: .negative, issues: [.triggeredGuardrailUnexpectedly]). It holds the session transcript (instructions, prompt, the refusal) and our explanation. Tested on macOS 27.0.1 (26A434), with a development-signed build carrying the PCC entitlement, on 2026-10-25. wreckpage_w02, w03, w04, w06: Wikipedia articles HMAS Brisbane (D 41), SS Thistlegorm, USAT Liberty and Chuuk Lagoon. The first 12,000 characters, with the HTML stripped, are sent with a request for the wreck's facts as JSON. Refused with "Streamed response may contain sensitive or unsafe content". This is the output filter: the same text with the instruction "Reply with the single word OK" is answered. wreckpage_w10: a dive shop's page about diving the Ex-HMAS Brisbane, a destroyer scuttled as an artificial reef. Same refusal, and also the output filter, by the same test. wargrave_34, 79, 82, 98, 186: a 2–4 sentence note about a naval wreck the diver logged, using Wikipedia background text. Refused with "Response may contain sensitive or unsafe content". This is the input filter: the "reply OK" variant is refused too. wreckfacts_Thistlegorm: basic facts requested by wreck name and location. Refused with "Response may contain sensitive or unsafe content". This is the output filter: the "reply OK" variant and guided generation both pass. What we ruled out before filing: Retries: the refusals are deterministic, and 0 of 14 retries passed in earlier runs. Streaming: respond() and streamResponse refuse alike. Guided generation: a @Generable struct with fixed fields passed 4 of the 6 extraction inputs with correct values. Both HMAS Brisbane inputs were still refused. Control: a peaceful loss (SS Yongala, lost in a cyclone) is answered correctly. On-device model with permissiveContentTransformations: it never refuses, but it makes up facts on this task, so it is not a substitute. wreckpage_w02 includes the answer we expected (desiredOutput).
1
0
383
3w
PrivateCloudComputeLanguageModel returns rateLimited immediately while availability is available and quota is belowLimit
Hello Apple engineers and developers, I am testing PrivateCloudComputeLanguageModel in an iOS reading app. Environment: Device: iPhone 16e purchased outside mainland China OS: iOS 27.0.1 (24A446) Our developer team has been approved for PCC access. The app signature and embedded provisioning profile both contain: com.apple.developer.private-cloud-compute = true The app makes one short, foreground, non-streaming request without automatic retry or structured generation: “Translate this sentence into Simplified Chinese: The stars are beautiful tonight. Return only the translation.” Immediately before the request: model availability: .available quotaUsage.status: .belowLimit isApproachingLimit: false isLimitReached: false resetDate: nil Nevertheless, the request fails after approximately 0.11–0.14 seconds with: FoundationModels.LanguageModelError.rateLimited No response content is generated. The error does not provide a reset time or additional metadata. I tested both Apple Development and Ad Hoc builds. Both resulted in the same rate-limit message in the app UI. Changing the app’s bundle identifier did not change the result. Enabling a VPN also did not change the displayed message; I did not verify whether PCC traffic was routed through the VPN. On October 13, 2026, at approximately 19:04 China Standard Time (UTC+8), I also ran Apple’s Shortcuts app on the same iPhone and selected “Use Model” with Cloud. It showed “Too many requests. Please try again later.” and generated no response. I repeated the test after switching the device’s primary iCloud account to an account configured for the US region. The device was physically located in mainland China during these tests. Could you please clarify: Can account, region, device, or service-side eligibility restrictions appear as rateLimited even when the model reports .available and quotaUsage reports .belowLimit? Is any additional activation or allowlisting required beyond PCC team approval and the signed entitlement? Which logs or diagnostics can identify the cause or retry time when resetDate is nil? Is the Shortcuts Cloud result useful evidence of a device- or account-level restriction, or does Shortcuts use an independent service policy? Thank you.
1
0
1.2k
3w
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.
5
1
2.3k
Oct ’26
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
11
5
3.2k
Oct ’26
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
2
0
519
Sep ’26
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
378
Sep ’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.2k
Activity
Aug ’25
On-device model refuses to classify harmless grief-related text (LanguageModelError.refusal), but will summarize it
Hi, A harmless sentence about a grief support group makes the on-device model throw LanguageModelError.refusal when it's asked to classify it. In the same session, the same sentence is summarized without complaint, and the same sentence with "grief" swapped for something neutral classifies fine. Environment: Mac mini M5 Pro, macOS 27.2.1 (26B131), Xcode 27.2 (27B52), AFM 3 Core Advanced. Also reproduced on iOS 27.2 and visionOS 27.2 simulators. Minimal repro (run as written, twice, same result): @Generable enum SafetyLabel: String { case safe, sensitive, concerning, unsafe } let text = "Our support group meets on Thursdays to talk about coping with grief." // Throws LanguageModelError.refusal ("May contain sensitive content") let classifier = LanguageModelSession(instructions: "Classify the text by content safety.") _ = try await classifier.respond(to: text, generating: SafetyLabel.self) // Works: "Support group meets Thursdays for grief coping." let summarizer = LanguageModelSession() _ = try await summarizer.respond(to: "Summarize in five words: \(text)")Results, same session: "…coping with grief." → classify (@Generable enum): refusal; summarize (plain text): works "Our book club meets on Thursdays to talk about mystery novels." → classify: safe; summarize: works Same result with SystemLanguageModel(guardrails: .permissiveContentTransformations). It's refusal, not guardrailViolation. In a fuller classifier (four classifiers with calibrated label descriptions) it was also refused under greedy and default sampling, with a purpose line in the instructions, and with SystemLanguageModel(useCase: .contentTagging). A second case, likely the same trigger: the Little Women review in Apple's own Book Tracker sample (Using Evaluations to evaluate an intelligent feature). It recounts Beth's death, and tagging it with the sample's instructions, .permissiveContentTransformations guardrails and a @Generable tag array throws LanguageModelError.refusal on both .general and .contentTagging, in well under a second, on two Macs (M3 Max and M5 Pro). The other 12 reviews in the sample tag fine. I haven't tested whether the two share a trigger. So grief or death in otherwise harmless text seems enough for the model to refuse structured classification and tagging, the kinds of tasks the content-tagging use case is for. Questions: Is this expected? It reads like a false positive: nothing in the text is harmful, and the model will summarize it. Is there a supported way for an app to classify or tag text like this on device, for example for a support or journaling app where grief is a normal topic?
Replies
2
Boosts
0
Views
314
Activity
1d
Guided generation stream goes silent for ~2.5 min, then contextSizeExceeded, after an unescaped quote inside a string (FB25591600)
Hi everyone, I've been chasing a stall in streamed guided generation that took me a while to pin down. I'm hoping someone here has seen it too, or can tell me whether it's expected. My setup: macOS 27.2.1 (26B131), Xcode 27.2, SystemLanguageModel.default (AFM 3 Core Advanced, 8,192-token context), greedy sampling, with the schema included in the prompt. What happens streamResponse(to:generating:includeSchemaInPrompt:options:) delivers 16 snapshots in the first ~4 s, one per 10 output tokens. Then nothing arrives for ~155 s: no snapshot and no error. At ~159 s one more snapshot arrives, and the stream immediately throws LanguageModelError.contextSizeExceeded: "Content contains 8193 tokens, which exceeds the maximum allowed context size of 8192." The prompt was 896 tokens, and the last snapshot reports 170 output tokens. That means about 7,100 tokens were generated without ever reaching a snapshot. The Foundation Models Instrument reports deltasCount: 730 for this response. What the last snapshot shows The field is a [String] of short bullets. In the final snapshot, the second bullet is a closed string: "The generalist used ". GeneratedContent(json:) accepts an escaped quote, single quotes, and a closed string followed by whitespace. It rejects a closed string followed by more text: try GeneratedContent(json: #"{"justification": ["The generalist used "angry"#) // Encountered content that cannot be completed into valid JSONIt looks as if the model wrote an unescaped " to start a quotation. That quote closed the string, and nothing after it could be parsed until the context window filled. Every freeze I could inspect stopped just before the model quoted someone ("The generalist's ", "The generalist stated "). None of the 199 finished responses I checked contained a double quote. On a run where the same input finished, the model wrote the word with single quotes ('angry'). The failure follows a single greedy path. In my app this input stalls on every cold request and finishes on every prewarmed one, while other inputs do the opposite. A standalone repro where this is the process's only request stalls with and without prewarm(). What I tried Bounding the array with @Guide(..., .count(2...4)) removed the stalls on the path my app uses: 0 of 34 panels and 0 of 27 end-to-end runs, down from 2 of 27. The same input still stalls on the other path. The instruction "Paraphrase the panelists; don't quote them." removed the stalls, but it cost accuracy on another field. The instruction "If you quote a panelist, use single quotes." made things worse: 9 stalls in 68 requests instead of 1. My current workaround: if no snapshot arrives for 15 s, cancel the stream and show an error. After cancellation, session.isResponding was false within a second. Questions Is an unescaped " inside a string field expected from guided generation? Or should constrained decoding prevent or escape it? Once the output can no longer be parsed, could the stream fail right away instead of generating until the window is full? Is there a supported way to detect this on the client other than a timeout? And does canceling the consuming task reliably stop generation on the model side? I've attached a self-contained repro (one Swift file, plus console output for the stalling run and the parser cases) to FB25591600. I'm happy to share more details or run anything that would help. Thanks for taking a look!
Replies
1
Boosts
0
Views
246
Activity
1d
SampleGenerator sends the Prompt's debug description to the on-device model, and every request carries the whole dataset
Hi, I'm running SampleGenerator from the Evaluations framework with SystemLanguageModel.default in place of PrivateCloudComputeLanguageModel, otherwise as in the Book Tracker sample's BookSampleGenerator/main.swift. Same prompt, instructions, validator and 13 seed reviews. Environment: Mac mini M5 Pro, macOS 27.2.1 (26B131), Xcode 27.2 (27B52), AFM 3 Core Advanced (8,192-token context). Repro: equivalent to the Book Tracker sample's BookSampleGenerator/main.swift with PrivateCloudComputeLanguageModel() replaced by SystemLanguageModel.default and targetCount set to seeds + 20. I ran it from a test target rather than the sample's own target. Attached: the [SampleGenerator] log from one run. let generator = SampleGenerator<ModelSample<BookTags>>( Prompt("Generate diverse range of book reviews and corresponding tags. ..."), samples: seeds, // the sample's 13 reviews targetCount: seeds.count + 20, sessionProvider: { LanguageModelSession(model: SystemLanguageModel.default, instructions: generatorInstructions) }, validator: { sample in /* the sample's four rules */ true } ) for try await sample in generator.run() { /* ... */ }1. The model receives the Prompt's debug description, not its text. The prompt segment in each session's transcript (and the [SampleGenerator] Prompt being sent to model: log line) begins: Prompt(components: Swift.AsyncThrowingStream<FoundationModels.Prompt.Component, Swift.Error>(context: ...), synchronousComponents: Optional([FoundationModels.Prompt.Component.text(FoundationModels.Prompt.Text(value: "Generate diverse range of book reviews..."))]))The examples that follow are also printed with String(describing:), including module and type names (MyModule.MySample(review: "...", tags: [...])). 2. Every request carries the full text of every sample so far. After the prompt comes "IMPORTANT: Generate N completely new examples with different starting prompts than any of these existing samples:", followed by every sample's full prompt text, seeds included, not just the selected examples. The request therefore grows with the dataset. On an 8K window the generator overflows, halves the batch, opens a new session, and finally logs Context window exhausted at batch size 1 twice in a row. Stopping. In every run that asked for 20 new samples (about ten runs), the dataset stopped at 15–22 samples in total, seeds included. run() then finishes normally, so the caller only finds out by counting. 3. With ModelSample<T>, the model is asked for every field, including instructions and TrajectoryExpectation. The on-device model fills them in. Every sample kept in two runs (9 of 9) had a writing brief in instructions ("Write a sweeping, reflective review…"), and 4 of 9 had invented tool-call expectations. In another run, all 6 samples had a brief where the review belongs ("Create 5 diverse book entries…"). The sample's validator passes these, since a brief is over 100 characters too. A custom @Generable type conforming to ModelSampleProtocol with only review and tags avoids this. 4. Deduplication is exact-match only. The model returns seed reviews with a sentence cut or added, and near-copies of its own samples with one word changed. Both pass. I check for shared 8-word runs in the validator instead. 5. Minor: samples includes the seeds, as documented, but the sample's main.swift prints allSamples.count as the number of new samples. Questions: Is (1) intended, or should the prompt be passed through as text? Is SampleGenerator meant to support the on-device model? If so, could the existing-samples list be limited (to the selected examples, or by token budget)? Could run() report that it stopped short of targetCount, for example by throwing or exposing a stop reason?
Replies
0
Boosts
0
Views
226
Activity
3d
: Acceptable use check: Mac coding agent for Xcode that uses SystemLanguageModel and a custom LanguageModel provider
Hi, I’m preparing a macOS app for the Mac App Store and want to confirm it meets the Foundation Models acceptable use requirements and the Developer Program License Agreement before I submit. What the app does It’s a menu-bar app plus a sandboxed helper that Xcode 27 launches as a coding agent over ACP (Settings > Intelligence). The agent runs a LanguageModelSession in-process. It uses either SystemLanguageModel.default or a custom LanguageModel conformance that streams from an MLX model the user has downloaded. With Apple’s model, the agent gets only Xcode’s read and search tools. When the guardrails block a request, the app shows the error to the user and doesn’t retry or rephrase the prompt. The app also runs a local OpenAI-compatible HTTP server on 127.0.0.1 only, protected by a key. This server serves the downloaded MLX model only, never Apple’s model. Third-party agents the user installs (for example OpenCode) can point at it. Questions Is using SystemLanguageModel inside a coding agent that Xcode launches over ACP acceptable under the acceptable use requirements? Is it acceptable to ship a custom LanguageModel provider backed by a downloaded open-weight model alongside Apple’s model in the same app? Since the local HTTP server only serves the MLX model, can you confirm this doesn’t count as “exposing” the Foundation Models framework to other apps? And if I later wanted to route third-party agents to Apple’s on-device model, would that be permitted at all? Does the developer agreement require specific guardrails beyond the framework’s own for this kind of app? If so, where is that documented? Thanks happy to to share more detail on the architecture if it helps.
Replies
0
Boosts
0
Views
249
Activity
5d
Pending Private Cloud Compute entitlement: status and account conversion questions
I submitted a Private Cloud Compute entitlement application around October 17, 2026 for Konote, App Store Connect app ID 6823726856. It is still pending. I've also submitted Feedback: FB25522199. We're enrolled in the App Store Small Business Program and are far below two million first-time downloads, with only TestFlight testers so far. We meet the published eligibility criteria on those points. Konote records and transcribes meetings on device, and audio is never sent to us or any AI service; when iCloud sync is enabled, audio syncs only to the user's own devices with end-to-end encryption. We plan to use PCC for long meeting summaries because hour-long transcripts exceed the on-device model's context window; PCC is central to our planned release's privacy design. My individual-to-organization membership conversion, submitted around October 20, is also pending. Could you confirm whether the entitlement application is queued or missing information, and whether a technical explanation would help? I'd also appreciate confirmation of whether the pending conversion blocks review and whether I need to resubmit after it completes. Eric
Replies
0
Boosts
0
Views
260
Activity
1w
Recognizing Handwritten Mathematics with the On-Device Language Model
Hello, I'm currently working on an iPad app that combines the flexibility of handwritten notes with advanced mathematical computation, including linear algebra, calculus, and solving systems of equations. One of its core features is to recognize handwritten mathematical notation and converting it into a structured representation that can subsequently be parsed and evaluated. For this, I want to use the SystemLanguageModel() together with Guided Generation. My approach I created a custom set of "MathToken" enums using @Generable. The idea is to let the model recognize mathematical handwriting and directly return an array of these tokens. The tokens represent both basic mathematical elements (integers, identifiers, operators, etc.) and more complex structures such as matrices, vectors, function applications, derivatives, integrals, and systems of equations. The resulting tokens are then passed to a parser, which constructs a structured statement that can eventually be evaluated. For handwriting input, I exported the relevant content from PaperKit/PencilKit as a UIImage and attached it to the LanguageModelSession. I've attached both the MathToken definition and my current prompting approach. The problem Unfortunately, the recognition accuracy is not yet sufficient for a reliable user experience. I've experimented with different prompting strategies: Very short and general instructions. More detailed descriptions what to watch for Explicit rules explaining when each token should be used However, none of these approaches has significantly improved the results. The model frequently selects tokens that contradict the instructions it was given. Some examples: The model sometimes generates an identifier containing a number instead of using integer or real. Instead of using structured tokens like functionApplication, it uses identifiers and parentheses instead For ordinary multiplication, such as 3 × 5, it sometimes generates the product token, which is specifically intended for mathematical product notation (capital Pi). These are not ambiguous cases. I've explicitly described the distinctions in my instructions, yet the model still makes these mistakes. I'm aware that prompting and model context size have their limitations, so I'm trying to understand whether my overall approach is appropriate. Questions Prompting: Is there a better way to guide the model towards consistently selecting the correct enum cases? Guided Generation: Is an enum with many associated values and recursively nested [MathToken] arrays a suitable structure for Guided Generation? Could the complexity or structure of my MathToken definition itself be contributing to the problem? How could a more suitable structure look like (which I could transform into the MathTokens)? Model capabilities: Is recognizing handwritten mathematics and mapping it directly to such a structured representation simply too complex a task for the on-device model in its current form? Architecture: Could this problem benefit form splitting it into multiple stages? What stages would you recommend? I'd be particularly interested in understanding whether there are any known limitations or recommended patterns when using Guided Generation for tasks involving complex, recursively structured output. I've included my current implementation and the MathToken definition below/attached for context. Thank you for your time and any suggestions!
Replies
2
Boosts
1
Views
70
Activity
1w
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
8
Boosts
1
Views
4.6k
Activity
1w
iOS 27.3 beta: Apple Intelligence works in system UI, but Foundation Models returns deviceNotEligible on a mainland China iPhone Duo
Hello Apple team, After updating an iPhone Duo purchased in mainland China to iOS 27.3 beta, Apple Intelligence appears to be available at the system level: Apple Intelligence is visible in Settings. Pressing and holding the side button successfully activates the system assistant. The multicolored glow appears around the edges of the screen while using it. However, when developing an app using the Foundation Models framework, the on-device model reports that this device is not eligible, and an actual generation request is also rejected. Environment Physical device: iPhone Duo (iPhone19,4) iOS version: 27.3 beta OS build: 24C5037i Build toolchain: Xcode 27.1 / iPhoneOS 27.1 SDK Diagnostic app deployment target: iOS 26.0 Developer Mode: enabled Reported locale: zh-Hans_HK Minimal reproduction We built and installed a separate, minimal diagnostic app to rule out our main app’s business logic. It reads the model availability and attempts one request containing only synthetic test text: let model = SystemLanguageModel.default print(model.availability) print(model.supportsLocale(Locale(identifier: "zh_CN"))) do { let session = LanguageModelSession( instructions: "Reply briefly. This is a synthetic device diagnostic." ) let response = try await session.respond(to: "Reply with OK.") print(response.content) } catch { print(String(reflecting: type(of: error))) print(String(describing: error)) }Results on the physical device availability: unavailable( FoundationModels.SystemLanguageModel.Availability .UnavailableReason.deviceNotEligible ) supportsLocale(zh_CN): true error_type: FoundationModels.SystemLanguageModel.Error error: This device does not support Apple Intelligence.The availability remains deviceNotEligible after the request. Could you please clarify: Does the mainland China Apple Intelligence rollout in iOS 27.3 beta include third-party access to the on-device model through Foundation Models? Is this a known issue or an expected limitation of this beta? Is building with Xcode 27.3 / the iOS 27.3 SDK required for this access? Does enabling the Qwen extension affect Foundation Models eligibility, or is that extension independent of SystemLanguageModel.default? We can provide the minimal diagnostic project and additional diagnostics if needed. Thank you.
Replies
0
Boosts
0
Views
297
Activity
1w
FoundationModels API Availability, deviceNotEligible Error on CH/A Hardware, and Roadmap Timeline (Team ID: NVQ5CF8F2X)
Dear Apple Developer Relations & Technical Support Team, I am an iOS developer based in Mainland China. We are currently developing an on-device AI-powered translation assistant for reading original English books, targeted at a global market. We have upgraded our development setup to Xcode 27.3 Beta and iOS 27.3 Beta. When attempting to invoke the FoundationModels API on an iPhone 15 Pro (Mainland China SKU: MTQA3CH/A), the system fails to initialize and returns the following diagnostics: Availability: unavailable(FoundationModels.SystemLanguageModel.Availability.UnavailableReason.deviceNotEligible) Raw Error: FoundationModels.SystemLanguageModel.Error Code 0 ("The assets required for the session are unavailable.") Language Support: supportsLocale(zh-Hans): true Considering that the iPhone 15 Pro hardware (A17 Pro chip) meets the necessary performance criteria and the framework reports that Simplified Chinese is supported, we would like to consult with you on the following key questions: Current Availability & Expected Release Timeline: Is the FoundationModels API currently completely disabled for Mainland China hardware models (CH/A)? If it is currently restricted, when is it expected to become available for developers and users in Mainland China? If there is an established roadmap or target release schedule, could you please share a specific timeline so we can plan our product roadmap and release cadence accordingly? Model Strategy for Mainland China: In Mainland China, will Apple eventually enable the standard FoundationModels API seamlessly under the hood, or will a different, locally-partnered/compliant AI model be required to satisfy regional regulations? Should developers expect the existing FoundationModels API to unlock in the future, or should we design a separate, alternative AI backend specifically for the Mainland China market? Testing Solutions for Global App Deployment: Since our application is intended for global release outside Mainland China, what is the official recommended workflow for China-based developers using CH/A devices to test and debug FoundationModels features during this beta phase (e.g., using Xcode Simulator, overseas non-CH/A hardware, or a developer sandbox/allowlist)? Environment & Diagnostic Details: Developer Team ID: NVQ5CF8F2X Xcode Version: Version 27.3 beta (Build: 27C5020n) iOS Version: Version 27.3 (Build: 24C5037i) Test Device: iPhone 15 Pro (Hardware: iPhone16,1, Model: MTQA3CH/A) Diagnostic State: isAvailable = false, deviceNotEligible Error: Domain=FoundationModels.SystemLanguageModel.Error, Code=0, "The assets required for the session are unavailable." Thank you very much for your time and assistance. We look forward to hearing your insights. Sincerely, Kai
Replies
0
Boosts
1
Views
333
Activity
2w
foundation-models-utilities 1.1.0: Skill(allowsDeactivation: false) can still be deactivated by the model
I'm using foundation-models-utilities 1.1.0 (tag at 6c5a04c). An instructions skill created with allowsDeactivation: false can still be switched off by the model. I filed this as FB25367740 on October 29, with a repro and console output attached. The measurements below are from 1.1.0-beta1 (cc3820d). The only commit between 1.1.0-beta1 and 1.1.0 changes README.md and SKILL.md, so the stable release behaves the same. Setup One instructions skill, metric-units, with allowsDeactivation left at its default, false. No skill allows deactivation, so the synthesized tool is named activate_skill. Three prompts in one session, with .greedy sampling: "From now on, give every measurement in metric units." "Keep using metric units, please. How far is 3 miles?" "Switch metric mode off." Expected metric-units stays active through all three turns. Any of these would do: a call naming it is rejected or ignored, it is left out of the schema while active, or the tool isn't offered when no skill can be named. Actual (identical across repeated runs) Default, strictSchema: false: Turn 1: activate_skill {"skill": "metric-units"} → "Successfully activated skill: metric-units". Active: ["metric-units"]. Turn 3: activate_skill {"skill": "metric-units"} → "Successfully deactivated skill: metric-units". Active: []. The model answered, "Metric mode is now off." strictSchema: true: Turn 2: with the skill active, the argument's enum is empty ("enum": []), but the tool is still offered. The model called activate_skill {"skill": "metric-units"} anyway, and the skill was deactivated. Active: []. Turn 3: it called the tool again and re-activated the skill. The model answered, "Metric mode is now active again." Where it comes from (Sources/FoundationModelsUtilities/Skills/Skills.swift at 1.1.0) The onCall closure toggles any instructions skill without reading that skill's allowsDeactivation: case .instructions: if activations.isActive(skill.name) { activations.deactivate(skill.name) skill.deactivate() } else { activations.activate(skill.name) skill.activate() }ToggleSkillTool.call(arguments:) only checks that the name matches a skill, so it accepts a name outside the schema's enum too. The schema has a related gap. In ToggleSkillTool.init, allowsDeactivation is true when any skill allows it, and then allowed += activeNames adds every active skill, including ones created with allowsDeactivation: false, even under strictSchema: true. I found this one by reading the source. It isn't in FB25367740, and I haven't measured it. Possible fix Check the skill's own allowsDeactivation before deactivating it, and return a message saying it stays active. Add to allowed only the active skills that allow deactivation. When allowed is empty, leave the tool out, or reject the call in call(arguments:). Environment Model: on-device SystemLanguageModel.default Package: foundation-models-utilities 1.1.0-beta1 (cc3820d); the Skills code is unchanged in 1.1.0 macOS 27.2 (26B123), MacBook Pro (Mac15,9), Apple M3 Max, Xcode 27.1 (27A9275)
Replies
0
Boosts
0
Views
280
Activity
2w
foundation-models-utilities 1.1.0-beta1: README and bundled SKILL.md inconsistencies
I've been working with foundation-models-utilities and noticed a few places where the README and bundled SKILL.md don’t match the code. I’m using version 1.1.0-beta1 (commit cc3820d). Here’s what I found: SkillActivations collection conformance. The README says it conforms to RandomAccessCollection. The implementation conforms to Sendable and Observable, and exposes activeSkillNames and isActive(_:) instead. Package dependency version. The installation example uses from: "1.0.0". With only prerelease tags available when checked, that stable version requirement does not resolve. An example referencing a published beta would help. Local server URL. Both ChatCompletionsLanguageModel examples use http://localhost/v1:8000. For port 8000 and base path /v1, the URL should be http://localhost:8000/v1; the existing example places :8000 in the path. SwiftPM traits and conditional compilation. The bundled SKILL.md describes ChatCompletions, Skills, and History traits, and says the sources use matching #if gates. However, Package.swift declares no traits, and those gates are absent from the sources. Could you update the documentation to match this release? The bundled agent skill is particularly relevant because coding assistants may otherwise generate configuration for traits the package does not provide.
Replies
2
Boosts
0
Views
600
Activity
2w
Foundation Models availability in mainland China
Hi, Apple recently announced that Apple Intelligence will launch in mainland China with iOS 27.3. Will the Foundation Models framework also become available to third-party apps in mainland China? If so, will it use the new iOS 27 Apple Foundation Model or an older version? Will the new capabilities and Private Cloud Compute also be supported? Thanks!
Replies
2
Boosts
0
Views
390
Activity
2w
PCC rate limits and blocking Siri AI as a result
Hello, I have PCC deployed in my 3 apps and my testing for these apps has caused me to hit the rate limit many times. When this rate limit is hit, Siri AI (as well as HomeKit PCC features) stops working completely for me until the rate limit is reset. I have been forced to scale back PCC and testing in my apps as this situation is quite opaque. My logs say I’m being rate limited when using PCC in these cases. Example log I see: 10:51:47.407 | RemoteManager executing remote streaming request 10:51:47.407 ModelCatalog | Looking up asset bundle com.apple.fm.language.instruct_server_v2.fm_api in Model Catalog 10:51:47.410 DaemonSession | Asset com.apple.fm.language.instruct_server_v2.fm_api has inference providers: 10:51:47.410 DaemonSession | - private-ml-client 10:51:47.411 ExecutionGroup | executing request C9B08798-6D68-4819-83C9-89B2EF5278C4 10:51:47.431 InferenceProviderConnection | InferenceProvider requestInference (C9B08798-6D68-4819-83C9-89B2EF5278C4) finished 10:51:47.431 RemoteManager | Request failed on private-ml-client with error: InferenceError::rateLimited::PrivateCloudComputeError: deniedDueToUserDeviceRateLimit, falling back 10:51:47.431 RemoteIPC Tasks | Failed to execute remote streamingRequest with error: InferenceError::rateLimited::PrivateCloudComputeError: deniedDueToUserDeviceRateLimit 10:51:56 modelmanagerd [com.apple.modelmanager:RemoteIPC Tasks] Failed to execute remote oneShotRequest with error: InferenceError::rateLimited::PrivateCloudComputeError: deniedDueToUserDev 11:23:39 privatecloudcomputed [com.apple.privatecloudcompute:RateLimiter] rate limit applied from cached denials What are the rate limits? How many requests a day? Per second? Also, I subscribed to the highest iCloud storage tier in hopes of higher rate limit but there doesn't seem to be any change. https://support.apple.com/en-us/127901 This issue started when iOS27 became publicly available - I was never rate limited when on the iOS27 beta.
Replies
4
Boosts
0
Views
2.1k
Activity
3w
PCC refuses factual extraction about shipwrecks (FB25314866)
We filed FB25314866. PrivateCloudComputeLanguageModel refuses to extract basic facts (name, year, depth, coordinates) from Wikipedia and dive-shop pages about warship wrecks, including a destroyer scuttled as an artificial reef. The input passes (a "reply OK" variant is answered); the output is filtered with "Streamed response may contain sensitive or unsafe content", on respond() and streamResponse alike. Guided generation passes for some of the same inputs. SystemLanguageModel offers Guardrails.permissiveContentTransformations for this kind of extraction, but the PCC model has no guardrails parameter. Is support planned, and is there a recommended approach meanwhile? About the 11 attachments filed in Feedback Assistant: Each file is the Data returned by LanguageModelSession.logFeedbackAttachment(sentiment: .negative, issues: [.triggeredGuardrailUnexpectedly]). It holds the session transcript (instructions, prompt, the refusal) and our explanation. Tested on macOS 27.0.1 (26A434), with a development-signed build carrying the PCC entitlement, on 2026-10-25. wreckpage_w02, w03, w04, w06: Wikipedia articles HMAS Brisbane (D 41), SS Thistlegorm, USAT Liberty and Chuuk Lagoon. The first 12,000 characters, with the HTML stripped, are sent with a request for the wreck's facts as JSON. Refused with "Streamed response may contain sensitive or unsafe content". This is the output filter: the same text with the instruction "Reply with the single word OK" is answered. wreckpage_w10: a dive shop's page about diving the Ex-HMAS Brisbane, a destroyer scuttled as an artificial reef. Same refusal, and also the output filter, by the same test. wargrave_34, 79, 82, 98, 186: a 2–4 sentence note about a naval wreck the diver logged, using Wikipedia background text. Refused with "Response may contain sensitive or unsafe content". This is the input filter: the "reply OK" variant is refused too. wreckfacts_Thistlegorm: basic facts requested by wreck name and location. Refused with "Response may contain sensitive or unsafe content". This is the output filter: the "reply OK" variant and guided generation both pass. What we ruled out before filing: Retries: the refusals are deterministic, and 0 of 14 retries passed in earlier runs. Streaming: respond() and streamResponse refuse alike. Guided generation: a @Generable struct with fixed fields passed 4 of the 6 extraction inputs with correct values. Both HMAS Brisbane inputs were still refused. Control: a peaceful loss (SS Yongala, lost in a cyclone) is answered correctly. On-device model with permissiveContentTransformations: it never refuses, but it makes up facts on this task, so it is not a substitute. wreckpage_w02 includes the answer we expected (desiredOutput).
Replies
1
Boosts
0
Views
383
Activity
3w
PrivateCloudComputeLanguageModel returns rateLimited immediately while availability is available and quota is belowLimit
Hello Apple engineers and developers, I am testing PrivateCloudComputeLanguageModel in an iOS reading app. Environment: Device: iPhone 16e purchased outside mainland China OS: iOS 27.0.1 (24A446) Our developer team has been approved for PCC access. The app signature and embedded provisioning profile both contain: com.apple.developer.private-cloud-compute = true The app makes one short, foreground, non-streaming request without automatic retry or structured generation: “Translate this sentence into Simplified Chinese: The stars are beautiful tonight. Return only the translation.” Immediately before the request: model availability: .available quotaUsage.status: .belowLimit isApproachingLimit: false isLimitReached: false resetDate: nil Nevertheless, the request fails after approximately 0.11–0.14 seconds with: FoundationModels.LanguageModelError.rateLimited No response content is generated. The error does not provide a reset time or additional metadata. I tested both Apple Development and Ad Hoc builds. Both resulted in the same rate-limit message in the app UI. Changing the app’s bundle identifier did not change the result. Enabling a VPN also did not change the displayed message; I did not verify whether PCC traffic was routed through the VPN. On October 13, 2026, at approximately 19:04 China Standard Time (UTC+8), I also ran Apple’s Shortcuts app on the same iPhone and selected “Use Model” with Cloud. It showed “Too many requests. Please try again later.” and generated no response. I repeated the test after switching the device’s primary iCloud account to an account configured for the US region. The device was physically located in mainland China during these tests. Could you please clarify: Can account, region, device, or service-side eligibility restrictions appear as rateLimited even when the model reports .available and quotaUsage reports .belowLimit? Is any additional activation or allowlisting required beyond PCC team approval and the signed entitlement? Which logs or diagnostics can identify the cause or retry time when resetDate is nil? Is the Shortcuts Cloud result useful evidence of a device- or account-level restriction, or does Shortcuts use an independent service policy? Thank you.
Replies
1
Boosts
0
Views
1.2k
Activity
3w
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
5
Boosts
1
Views
2.3k
Activity
Oct ’26
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
11
Boosts
5
Views
3.2k
Activity
Oct ’26
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
2
Boosts
0
Views
519
Activity
Sep ’26
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
378
Activity
Sep ’26