
Apple shipped nine updates to the Foundation Models framework at WWDC 2026 on June 8 — and the one buried at the bottom of the release notes is the most interesting: the framework now runs on Linux. Alongside multimodal image input and a Python SDK, Apple also introduced a model abstraction layer that lets developers swap its on-device model for Anthropic Claude or Google Gemini without touching their downstream code. One keynote, and the “iOS-only” objection to Foundation Models is mostly gone.
The Model Abstraction Layer Is the Actual News
Foundation Models has always been Apple’s model or nothing. That changes in iOS 27. A new LanguageModel protocol creates a shared interface that Apple’s on-device model, Google Gemini, and Anthropic Claude all implement. You write session logic once. You swap providers by changing one line.
// Apple's on-device model — free, no network required
let session = LanguageModelSession()
// Switch to Gemini via Firebase AI Logic
let geminiModel = GeminiModel(apiKey: .keychain)
let session = LanguageModelSession(model: geminiModel)
// Switch to Claude via Anthropic Swift package
let claudeModel = ClaudeModel(apiKey: .keychain)
let session = LanguageModelSession(model: claudeModel)
Google’s integration uses Firebase AI Logic — a production-grade backend that handles OAuth and Keychain-based auth so API keys never appear in source code. Both Anthropic and Google have published official Swift packages. Per-token usage tracking (including cached and reasoning tokens) works across all three providers.
The strategic play is obvious: Apple becomes the on-device AI orchestration layer for every iOS app, regardless of which model it actually runs. The protocol is the moat, not the model. Google’s announcement confirms that Gemini models plug directly into the Foundation Models framework using the same API as Apple’s on-device models, enabling hot-swapping between local and cloud inference with a single code change.
Image Input: Finally, but With a Catch
Foundation Models can now accept images alongside text prompts. The API is as simple as the existing text interface:
let response = try await session.respond {
"What animal is this?"
Attachment(UIImage(named: "photo.jpg")!)
}
Supported types include UIImage, NSImage, CGImage, Core Image, CoreVideo pixel buffers, and file URLs. Practical use cases: visual product recommendations, receipt parsing, image-based search — all on-device, no server call.
The catch: image input requires AFM 3 Core Advanced, the new 20-billion parameter sparse model that ships on high-end devices only. If you’re targeting iPhone 15 Pro and above, or the latest iPad Pro and Mac, you’re fine. If your app needs to reach iPhone 14 users, you still get text-only Foundation Models there.
The architecture behind AFM 3 Core Advanced is worth noting: all 20 billion parameters live in flash storage, but only 1–4 billion activate at inference time depending on request complexity. It is a genuine mobile-optimized mixture-of-experts architecture, not a shrunken version of a server model. Apple’s research paper shows AFM 3 Core achieving 45.6% preference over the 2025 baseline, with AFM 3 Cloud jumping from 8.7% to 64.7% preference — a dramatic generational improvement.
Python SDK and the Linux Surprise
Apple shipped a Python SDK for Foundation Models alongside the WWDC announcement:
import apple_fm_sdk as fm
model = fm.SystemLanguageModel()
available, reason = model.is_available()
session = fm.LanguageModelSession(model=model)
response = await session.respond(prompt="Summarize this document.")
More notably, Apple open-sourced the Foundation Models framework utilities package and confirmed that the core framework runs on Linux servers via Swift’s open-source runtime. This is not a full production server runtime — it is primarily aimed at data scientists and ML researchers who want to use Apple’s on-device model in Python tooling or server-side scripting contexts. But it kills the “Foundation Models is an iOS sandbox toy” objection.
macOS 27 also ships a new fm CLI tool. fm chat opens an interactive terminal session with the on-device model; shell scripts can pipe through it for summarization, extraction, or text generation without writing a single line of Swift or Python.
Free Capabilities That Ship Out of the Box
Three built-in system tools are available to any app using Foundation Models:
- Spotlight Search Tool — Enables local retrieval-augmented generation using the device’s existing Spotlight index. No embeddings, no vector database, no setup. RAG in two lines of Swift.
- OCRTool — Vision-backed text extraction from images, results passed directly to the LLM for reasoning.
- BarcodeReaderTool — Barcode and QR code reading fed into the model context.
The Spotlight RAG capability is the standout. Developers have been spinning up vector databases for on-device search use cases that Spotlight already handles. The new tool routes user queries through Spotlight search first, then feeds results into Foundation Models context — a pattern that previously required significant custom infrastructure. The WWDC 2026 session on Foundation Models walks through a complete Spotlight RAG implementation in under five minutes.
What Apple Still Has Not Given You
TechCrunch ran the headline “Apple plays catch-up at WWDC” and the framing is not entirely unfair. Two constraints remain unchanged:
You cannot swap in custom model weights. Foundation Models uses Apple’s model on-device, or routes to a cloud provider. There is no “bring your own fine-tune” path for the on-device runtime. If your use case requires a domain-specific model, you are looking at Core AI — Apple’s new framework for third-party model weights — rather than Foundation Models.
EU and China users do not get the new Siri AI features yet, due to regulatory constraints. The Foundation Models developer API is not affected by this restriction — your apps can use it — but the end-user-facing features tied to Apple Intelligence have the same geographic limitation as before.
What to Do Now
If you ship an iOS or macOS app and have not yet integrated Foundation Models, iOS 27 beta is the time to start. The framework has matured significantly, and the model abstraction layer means you are no longer locked to Apple’s model quality ceiling. Prototype with the on-device model, route to Claude or Gemini for complex queries — same SDK, same session logic, different provider.
Two practical first steps: download Xcode 27 beta and run fm chat in Terminal to test the on-device model directly. Then review Apple’s updated Foundation Models documentation for the new session and context APIs before targeting an iOS 27 release.













