AnyLanguageModel 1.0: One Year of Local Models on Apple Platforms
Last November, AnyLanguageModel 1.0 was introduced as a drop-in replacement for Apple's Foundation Models framework, allowing app developers to choose their model and provider. It addressed the complexity of supporting multiple inference providers and helped developers get started with local models on Apple platforms. The framework can be integrated using a Swift package dependency from "https://github.com/huggingface/AnyLanguageModel", starting from version "1.0.0", with "MLX" traits.
This marks the first anniversary of AnyLanguageModel, highlighting its role in simplifying local model integration on Apple platforms unlike earlier, more complex approaches.
Time & source
Times shown in UTC
Display time zone: UTC
Local time zone unavailable; showing UTC.
PublishedOffset at this time: UTC+0Oct 20, 2026, 00:00 UTC
IngestedOffset at this time: UTC+0Oct 20, 2026, 13:00 UTC
- Published
- Oct 20, 2026, 00:00
- Ingested
- Oct 20, 2026, 13:00
- Source type
- Official
- Tier
- First-party
- Source status
- Healthy
Tier is a per-source editorial setting, not a per-item score.
Discussion trend
The percentage is based on collected discussion signal, not new comments or independent people. The curve only compares the same topic across time.
Last November, we introduced AnyLanguageModel on this blog: a drop-in replacement for Apple's Foundation Models framework that lets you choose the model and provider your app uses. We heard from app developers who were curious about local models but weren't always sure how to get started. They also wanted to avoid the added complexity of supporting multiple inference providers. AnyLanguageModel grew out of that feedback.
Local and hosted inference each have their strengths, and both have a role in building this new generation of intelligent apps. A shared API makes it easier to choose the right model for each task.
A year and dozens of releases later, AnyLanguageModel 1.0 is out, along with swift-huggingface 1.0 and swift-xet 1.0 .
Here's what changed, and what's next:
A drop-in compatible API
The core idea of AnyLanguageModel remains the same: use the Foundation Models API with the model that fits your app. To get started, change your import statement:
- import FoundationModels + import AnyLanguageModel
The same session code then works with the system model, with open-weight models through llama.cpp, MLX, and Core ML, and with the hosted providers below.
Over the past year, we've added several major features:
- Tool calling works with every provider.
- Guided generation works with every provider, too, including nested @Generable types and arrays of them.
- Image support lets you attach images to prompts using Foundation Models 27's syntax, including when you use the system model on iOS, macOS, and visionOS 27.
On OS 27, AnyLanguageModel also works with any model that conforms to Foundation Models' LanguageModel protocol, including Core AI models.
Alongside AnyLanguageModel, we've built out swift-huggingface and swift-xet to bring accelerated model downloads from the Hub to Swift apps.
Hosted models, too
Support for hosted models expanded this year, too. AnyLanguageModel now supports:
- OpenAI's Chat Completions and Responses APIs
- Open Responses , for any provider with a compatible endpoint
- Anthropic's Messages API, with adaptive thinking and effort options
- Google's Gemini API
- Ollama
- Private Cloud Compute, on OS 27
- Hugging Face Inference Providers , and other OpenAI-compatible endpoints such as OpenRouter, through a custom base URL
With Inference Providers, you can use open-weight models that are too big to run on the device with the same session code: