foundation-models

Documentation for Apple's Foundation Models framework, an API for using the language model behind Apple Intelligence inside apps. The supplied notes describe on-device processing, supported operating systems, devices, and languages.

In plain words
What is it for?
Use it when integrating Apple's on-device language model into apps or checking availability, privacy, offline operation, supported devices, and supported languages.
Why use it?
It gives developers the platform and device requirements needed to decide whether and how to add these model features to an Apple app.

Cursor rule for Cursor

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add rules/getsentry/xcodebuildmcp-ios-template/foundation-models
Clone the repo
git clone --depth 1 https://github.com/getsentry/XcodeBuildMCP-iOS-Template

Made for: Cursor.

Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 2,705 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.02705
Opus 5 $0.00000 $0.01352
Sonnet 5 $0.00000 $0.00541
Haiku 4.5 $0.00000 $0.00270

Measured 2d ago against content hash 2c74bc33341f, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

foundation-models scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

template/.cursor/rules/foundation-models.mdc · 492 lines

How it starts

The opening of the file, as written. The whole thing — 492 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Apple Foundation Models Framework Documentation

Overview

The Foundation Models framework is Apple's new API announced at WWDC 2025 that provides developers with direct access to the on-device large language model powering Apple Intelligence. Released to beta on June 9, 2025, this framework enables developers to integrate powerful AI capabilities directly into their apps while maintaining user privacy through on-device processing.

Key Features

  • On-device processing: All AI inference runs locally on the device
  • Privacy-focused: No data leaves the device or is sent to cloud servers
  • Offline capable: Works without an internet connection
  • Zero cost: No API fees or cloud computing charges
  • Small footprint: Built into the OS, doesn't increase app size
  • Swift-native: Integrates seamlessly with Swift using as few as 3 lines of code

Platform Availability

  • iOS 26
  • iPadOS 26
  • macOS Tahoe 26
  • visionOS 26

Device Requirements

  • iPhone 16 (all models)
  • iPhone 15 Pro and iPhone 15 Pro Max
  • iPad mini (A17 Pro)
  • iPad models with M1 chip or later
  • Mac models with M1 chip or later
  • Apple Vision Pro

Language Support

Available at launch:

  • English, French, German, Italian, Portuguese (Brazil), Spanish, Japanese, Korean, Chinese (simplified)

Coming by end of 2025:

  • Danish, Dutch, Norwegian, Portuguese (Portugal), Swedish, Turkish, Chinese (traditional), Vietnamese

The Foundation Model

Model Specifications

  • Parameters: ~3 billion
  • Quantization: 2-bit (with 3.5-3.7 bits-per-weight average using mixed 2-bit and 4-bit configuration)
  • Architecture: Optimized for Apple Silicon
  • Performance:
    • Time-to-first-token latency: ~0.6ms per prompt token
    • Generation rate: 30 tokens per second on iPhone 15 Pro

Model Capabilities

The on-device model excels at:

  • Text summarization
  • Entity extraction
  • Text understanding and refinement
  • Short dialog generation
  • Creative content generation
  • Classification tasks
  • Content tagging
  • Natural language search

Read the full file on GitHub · 492 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 492 lines · 0 tokens per session scan A 2c74bc33341f

Subscribe to this mod's changes

foundation-models is a cursor rule published in the GitHub repository getsentry/XcodeBuildMCP-iOS-Template (43 stars, last pushed 1y ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,705 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.