Anthropic releases Swift package to run Claude in Apple's Foundation Models framework
Anthropic's `ClaudeForFoundationModels` Swift package lets developers use Claude as a server-side language model within Apple's Foundation Models framework, using the same `LanguageModelSession` API as Apple's on-device model.
Score breakdown
The package lets Apple platform developers switch between Claude and Apple's on-device model within a single, unified `LanguageModelSession` API, without adopting a separate SDK or request path.
- 01Anthropic released `ClaudeForFoundationModels`, a Swift package integrating Claude into Apple's Foundation Models framework as a server-side language model.
- 02The package conforms Claude to the `LanguageModel` protocol, enabling use via the standard `LanguageModelSession` API.
- 03Supported features include `respond(to:)`, streaming, guided generation, and tool calling.
Anthropic has released `ClaudeForFoundationModels`, a Swift package that makes Claude available as a server-side language model inside Apple's Foundation Models framework. The package conforms Claude to the framework's `LanguageModel` protocol, so developers interact with it through the standard `LanguageModelSession` API — the same interface used for Apple's on-device model. Supported capabilities include `respond(to:)`, streaming, guided generation, and tool calling. Requests travel directly from the app to the Claude API; Apple is not in the request path and does not see prompts or responses. Usage is billed to the developer's Anthropic account at standard API pricing.
It requires iOS 27, macOS 27, visionOS 27, or watchOS 27 — all currently in beta — as well as Xcode 27 (beta) and a Claude API key from the Claude Console.
The package is currently in beta. It requires iOS 27, macOS 27, visionOS 27, or watchOS 27 — all currently in beta — as well as Xcode 27 (beta) and a Claude API key from the Claude Console. It is installed via `Package.swift` by pointing to `https://github.com/anthropics/ClaudeForFoundationModels.git` from version `0.1.0`. The entry point is `ClaudeLanguageModel`, which accepts a model identifier (e.g., `.sonnet4_6`, `.opus4_8`), an auth mode, and optional parameters including `baseURL`, `timeout`, and `serverTools`. Model constants mirror API model IDs — for example, `.opus4_8` maps to `claude-opus-4-8` — and carry each model's capabilities. The repository also includes a runnable example target, `Examples/ClaudeExample`, which streams a chat turn to the terminal and supports a `--search` flag for server-side web search.
Key facts
- 01Anthropic released `ClaudeForFoundationModels`, a Swift package integrating Claude into Apple's Foundation Models framework as a server-side language model.
- 02The package conforms Claude to the `LanguageModel` protocol, enabling use via the standard `LanguageModelSession` API.
- 03Supported features include `respond(to:)`, streaming, guided generation, and tool calling.
- 04Requests go directly from the app to the Claude API; Apple is not in the request path and does not see prompts or responses.
- 05The package is in beta and requires iOS 27, macOS 27, visionOS 27, or watchOS 27, plus Xcode 27 (all in beta).
- 06Installed via `Package.swift` from `https://github.com/anthropics/ClaudeForFoundationModels.git`, version `0.1.0`.
- 07Model constants such as `.opus4_8` and `.sonnet4_6` mirror Claude API model IDs and carry per-model capabilities.
Topics
Summary and scoring are generated automatically from the original article. We always link back to the publisher and never republish images or paywalled content. Last processed Jun 15, 2026 · 11:57 UTC. How this works →