Apple's on-device AI API now has a cloud backdoor: Claude as a drop-in 'model'
Apple shipped a Swift API for its on-device model. Anthropic shipped a package that lets Claude answer through the exact same API. Same LanguageModelSession call, except the words are now leaving the phone.
You write your app once against Apple's Foundation Models protocol, then choose per session: the small local model, or Claude in the cloud. Requests go straight from the app to Anthropic; Apple isn't in the path.
The thread caught the sleight of hand fast. One reader who benchmarks open models noted Apple's framework caps local models near 3B parameters, so calling a frontier cloud model through an 'on-device' API is, charitably, hybrid.
One API, two very different places your prompt goes
Apple's Foundation Models framework (shipping in iOS 27 / macOS 27) is the standard Swift way to call AI on Apple platforms — the same LanguageModelSession API Apple uses for its own small on-device model. Anthropic's new ClaudeForFoundationModels package conforms Claude to that framework's model protocol, so the same respond(to:), streaming, structured output and tool calls work whether you point the session at Apple's local model or at Claude.
A reader reconstructed the shape of it from the docs: you write against the protocol once, then swap the model constructor — LanguageModelSession(model: SystemLanguageModel.default) for on-device, or a ClaudeLanguageModel(...) for the cloud tier. The crucial line, straight from the docs: "Requests go directly from your app to the Claude API; Apple is not in the request path and does not see prompts or responses." Billing goes app-developer to Anthropic, not through Apple.
"Is this actually on-device? Apple caps local models around 3B"
That framing is exactly what the thread refused to let slide.
"Apple's framework caps local models around 3B params last I looked, and Claude is way bigger than that. So either there's some hybrid setup… or this is mostly a Claude SDK in FM clothing." — a reader who benchmarks open models
He's right per the docs: this targets the framework's server-side model API. The "on-device" framing is the API surface, not the compute location.
The real story is who owns the abstraction layer
A more strategic read emerged. Apple is "right on the hot path of where developers are going to yolo slop into the ecosystem," argued one high-karma commenter, so defining a clean API that vendors like Anthropic build on — with billing flowing direct from Anthropic to the developer — is shrewd: Apple sets the standard without carrying the inference cost. Another framed it as a deliberate on-ramp: get developers used to Apple's abstraction now, so a future Apple model is a one-line swap.
Then the practitioners found the footgun. The docs warn an API key bundled in an app is extractable from the binary; the thread put it bluntly — "why would anyone ship claude keys like that", and "where does the api key reside?". The official answer is a production proxy (.proxied) so the app ships no key, but the default quick-start hands a key straight to the client.
For an iOS developer, the choice is now one argument
What changed isn't a model; it's a seam. Apple turned "which AI answers this" into a single model: parameter, and Anthropic was first to plug a frontier model into that slot. The convenience is real and so is the trap: a uniform API papers over the difference between "stays on the phone, works offline, free" and "leaves the device, costs money per call, needs a proxy." The interesting question is who fills that slot next — and whether Apple eventually fills it itself.
Get breakdowns like this every day
The top Hacker News stories, unpacked — by email, Telegram, or RSS.
The company that owns Fox News is buying Roku for $22B. Roku owners are eyeing the exits
Fox is paying $160 a share — about $22 billion — for the box on 100 million TVs and, more to the point, its first-party viewing data. The thread isn't debating valuation. It's swapping instructions for switching to anything else.