Services Case Studies Insights About Start a project →

iOS 27's Foundation Models framework: what the provider protocol means for mobile engineering.

Mobile Published September 22, 2026 8 min read

iOS 27 opened Apple's Foundation Models framework to any LLM provider, not just Apple's own. What the new session protocol actually changes, and how to build on it without getting burned by its limits.

Why this changes the calculus for mobile teams

iOS 27 shipped on September 14, 2026, and buried inside a routine annual update is the most consequential change Apple has made to on-device AI since it introduced Foundation Models in iOS 26. Until this release, the framework gave developers exactly one model to work with: Apple's own, running locally, with no way to swap it for anything else. That constraint made Foundation Models useful for a narrow set of tasks and irrelevant for anything requiring more capability than a small on-device model could offer. iOS 27 removes the constraint entirely. Apple introduced a public protocol, split across two types called LanguageModel and LanguageModelExecutor, that any provider can implement as a Swift package. Google's Gemini works through it today via Firebase's Apple SDK. Anthropic is a launch partner for Claude. Any MLX-format open weight model from Hugging Face qualifies too, running locally on a device's Neural Engine and GPU.

For a mobile engineering team, this is not a minor SDK update. It is the first time iOS has offered a single, stable session API that spans a free on-device model and a full-capability cloud model, with the same calling convention on both sides. Teams that have spent the last two years bolting third-party LLM SDKs onto their apps, each with its own auth flow, its own streaming format, and its own error handling, now have a native alternative that Apple maintains as part of the OS. Whether or not a team adopts Foundation Models specifically, the pattern it establishes, a model-agnostic session behind a stable interface, is worth understanding, because it is quickly becoming the default shape of mobile AI architecture rather than an unusual one.

What actually shipped

The on-device model itself got a real upgrade alongside the protocol change. Apple's third-generation Foundation Models family, internally AFM 3, ships in two sizes. AFM 3 Core is a 3-billion-parameter dense model that runs on iPhone 15 Pro and newer, iPad Pro with M2 or later, and Mac with Apple silicon. AFM 3 Core Advanced is a 20-billion-parameter sparse model using instruction-following pruning, meaning it only activates 1 to 4 billion parameters per prompt, but it needs an iPhone 17 Pro or an M4 Mac to run at all. For the overwhelming majority of apps shipping features this quarter, AFM 3 Core is the realistic target, since it covers a much larger installed base.

The developer-facing API is deliberately minimal. There is no API key to manage, no network call to make, and no per-request bill to track:

  • Availability check first LanguageModelSession.isAvailable gates the feature on unsupported hardware or devices where Apple Intelligence is disabled, and every integration needs a real fallback path behind that check rather than a silent crash.
  • Session creation is one call LanguageModelSession(instructions:) sets up a bounded conversation with system-level instructions, and session.respond(to:) streams a response back, all running on the Neural Engine with nothing leaving the device.
  • Typed output via the Generable macro Instead of parsing free text out of a model response, the @Generable macro lets you declare a plain Swift struct and get a typed instance back directly, which removes an entire category of brittle string-parsing code that has plagued LLM integrations on every platform.
  • Built-in tool calling The framework ships an OCRTool and other Vision-backed tools the model can invoke directly during generation, so a single session can read an image, extract structured text, and return typed data without the app orchestrating multiple separate calls.

A pattern web and backend teams already know

The provider protocol effectively brings a model gateway pattern to the client, a concept backend teams building on top of OpenRouter or a similar routing layer will recognize immediately. A session built against the on-device model during development can be pointed at Claude or Gemini for production simply by changing which type is passed into the session initializer. The tool definitions, the @Generable types, and the prompting logic stay untouched. That is a genuinely new capability for mobile specifically, where swapping model providers has historically meant rewriting a chunk of networking and parsing code, not changing a single line.

What to actually build first

AFM 3 Core is not a drop-in replacement for a frontier cloud model, and treating it as one is the fastest way to ship a disappointing feature. It is a small, fast, free model that is reliable at structured, bounded tasks and unreliable at open-ended reasoning or anything requiring broad world knowledge. The teams shipping something useful in the first weeks after iOS 27 are targeting a specific shortlist of tasks that map cleanly onto what a 3-billion-parameter model actually does well.

  • Structured extraction from user input Pulling a typed contact card, a categorized expense entry, or a set of tags out of free-form text or a photographed document, using @Generable to skip the parsing layer entirely.
  • Offline document and receipt processing Pairing OCRTool with a @Generable struct to turn a photographed receipt or ID into structured fields, fully offline, which matters directly for anything touching financial or medical data where a network round trip is a compliance question as much as a UX one.
  • Tone and content classification Flagging aggressive language before a message sends, suggesting a friendlier rewrite, or triaging support tickets by category, all of which are classification tasks a small model handles reliably.
  • On-device moderation for community features Apps that cannot justify routing every user post through an external moderation API for cost or latency reasons get a genuinely free, private first pass at zero marginal cost per check.

Each of these shares a property worth naming explicitly: the input is bounded, the desired output is structured, and a wrong answer is recoverable rather than catastrophic. That is the profile of task a 3-billion-parameter on-device model is suited for, and it is a wider net than most teams initially assume.

Where the model actually breaks

Three limitations matter enough to design around rather than discover in production. First, the context window. iOS 26's Foundation Models session capped out at 4,096 tokens, and while iOS 27 expands that ceiling, Apple has not published the new number as of this writing. Long documents, extended chat histories, or anything resembling a full codebase will not fit, and a session that silently truncates input is worse than one that fails loudly. Build a length check ahead of any call and route anything over a conservative threshold to a cloud model instead of trusting the session to handle it gracefully.

Second, there is no version pinning. Apple can and will update the underlying on-device model through ordinary iOS point releases, the same way it updates any other system framework. A feature whose behavior depends on a model producing specific phrasing, a specific output format outside of a @Generable schema, or a specific tone will drift without warning the next time a user updates their OS. The fix is architectural, not procedural: validate structured output against the schema rather than trusting exact wording, and build a small regression suite that runs against real device responses so a silent model update surfaces as a test failure instead of a support ticket.

Third, the hardware floor excludes a meaningful share of any real install base. AFM 3 Core needs an iPhone 15 Pro or newer, which puts it well ahead of the median device in most consumer app analytics dashboards today. Every integration needs a genuine fallback, not just a hidden feature flag, for users below that line, whether that fallback is a cloud call, a simpler heuristic, or an honest empty state.

A rollout plan that holds up

Teams that get real value out of this in the next few weeks are the ones treating it as an architecture decision rather than a feature flag. A few concrete steps make the difference between a demo and something that survives contact with production.

  • Design the session boundary once Wrap LanguageModelSession behind an internal protocol your app already owns, so swapping between the on-device model, Claude, or Gemini later is a configuration change rather than a rewrite, mirroring the provider abstraction Apple itself just shipped.
  • Start with one bounded, structured task Pick a single feature from the shortlist above, ship it behind the availability check, and resist the temptation to reach for open-ended chat as a first integration; chat is exactly the use case where the model's limitations show up fastest.
  • Instrument for silent model drift Log a sample of real responses against your @Generable schemas in production, and alert on schema validation failures, since that is the earliest signal an OS update changed model behavior underneath you.
  • Write the fallback path before the happy path Decide what unsupported hardware sees first, then build the Foundation Models integration on top of that baseline, not the other way around.

None of this requires betting the whole product on Apple's roadmap. What it requires is treating on-device inference as a genuine architectural option alongside a cloud API, with the same rigor around versioning, fallback, and testing that any other dependency gets. Teams that build that discipline now, while the feature set is small and the stakes are low, will be positioned to extend it the moment the context window grows or the hardware floor drops. We help clients design exactly this kind of provider-agnostic AI architecture as part of our mobile engineering practice.

Keep reading

Shipping an on-device AI feature this quarter?

Start a conversation →
KT Solutions Assistant

Before we start, please share a few details so we can follow up with you.

Please enter your name and a valid email address.

End this conversation? Your chat will be emailed to us.