Back
Anthropic Brings Claude to Apple's Foundation Models Framework
SiTech AI Team3 წთ. საკითხავი

Anthropic Brings Claude to Apple's Foundation Models Framework

Anthropic has released a Swift package that makes Claude a server-side language model inside Apple's Foundation Models framework, so apps can drive it with the same LanguageModelSession API they use for Apple's on-device model.

Anthropic has published Claude for Foundation Models, a Swift package that makes Claude usable as a server-side language model inside Apple's Foundation Models framework. The package conforms Claude to the framework's LanguageModel protocol, so developers drive it through the same LanguageModelSession API they already use for Apple's on-device model: respond(to:), streaming, guided generation and tool calling all behave the same way.

Same session API, requests go straight to Anthropic

ClaudeLanguageModel is the entry point. It is passed to LanguageModelSession together with a model constant such as .sonnet5 or .opus5_5 and an auth value. Requests travel directly from the app to the Claude API; Apple is not in the request path and does not see prompts or responses, and usage is billed to the developer's Anthropic account at standard API pricing. Model constants mirror API model IDs and carry each model's declared capabilities — sampling parameters, effort levels, adaptive thinking, structured output and image input — because sending a field a model rejects is a hard error. A fixedEffort setting pins a Claude effort level for every request, taking precedence over the framework's per-request reasoning hints.

Three authentication modes, with App Attest for keyless shipping

Authentication is set per model: .apiKey for development, .proxied to relay traffic through the developer's own back end, and .appAttest for apps that ship without any back end. With App Attest, each installation proves it is a genuine, unmodified build through Apple's attestation service, and Anthropic issues a workspace-scoped access token that expires after an hour, so the app carries no API key. It requires a physical device with a Secure Enclave and is not available through Amazon Bedrock, Google Cloud or Microsoft Foundry. Anthropic warns that a key bundled into a shipping binary is extractable and should be used only while developing.

Beta, OS 27 only, and what is missing

The package targets the server-side language model API introduced in the OS 27 betas and requires iOS 27, macOS 27, visionOS 27 or watchOS 27 plus Xcode 27, all in beta, so the API may still change. Server-side tools such as web search, web fetch and code execution can be configured per model with a usage limit and domain allow or block lists. Features that Apple's protocol cannot express are unavailable, including stop sequences, batch processing, the Files API, token counting and configurable prompt caching. The package is licensed under Apache 2.0, and external pull requests are not being accepted during the beta.

SSiTech

SiTech — AI-powered web development

We build fast, modern websites and bring AI into real business workflows. Have a project or a question? We'd love to help.