Introduced last November as a drop-in alternative to Apple’s Foundation Models framework, AnyLanguageModel lets developers choose the model and provider their app uses. The project was driven by developer feedback: many teams wanted to experiment with local models but avoid the extra complexity of supporting multiple inference providers.
The 1.0 release
After a year of development and dozens of interim releases, AnyLanguageModel 1.0 is now available, released alongside swift-huggingface 1.0 and swift-xet 1.0. The core idea is unchanged: continue to use the Foundation Models API while selecting the model that best fits your app. Upgrading is as simple as switching the import from FoundationModels to AnyLanguageModel; the same session code can then target the system model, local open-weight models (llama.cpp, MLX, Core ML), or supported hosted providers.
Key features added
- Tool calling works across all supported providers.
- Guided generation is available for every provider, including nested @Generable types and arrays.
- Image prompts are supported using Foundation Models 27 syntax, including when using the system model on iOS, macOS, and visionOS 27.
- On OS 27, AnyLanguageModel supports any model that conforms to the Foundation Models LanguageModel protocol, such as Core AI models.
Faster downloads and hosted provider support
The swift-huggingface and swift-xet libraries were built out to accelerate Hub-based model downloads into Swift apps. Hosted-model support has also expanded: AnyLanguageModel 1.0 now supports
- OpenAI Chat Completions and Responses APIs,
- Open Responses compatible endpoints,
- Anthropic Messages API with adaptive thinking/effort options,
- Google Gemini API,
- Ollama Private Cloud Compute on OS 27,
- Hugging Face Inference Providers and other OpenAI-compatible endpoints such as OpenRouter via a custom base URL.
Inference Providers let you use open-weight models that are too large to run locally while keeping the same session code. Hosted providers receive the same features as local models: guided generation, tool calling with streaming, and token usage reporting on responses. Reasoning blocks are now included in transcripts; when a provider is switched, AnyLanguageModel automatically omits reasoning blocks from requests if the new provider cannot replay them.
API keys and security
API keys are obtained via a closure rather than as static strings, enabling apps to fetch short-lived tokens from a backend server. The README provides guidance on when to allow users to bring their own keys and when to proxy requests through a server.
Linux and improvements for open-weight models
AnyLanguageModel runs on Linux as well, so the same code can operate on servers. Local open-weight models have become more capable and efficient; several popular models on the Hub today include:
- Gemma 4 E2B (Google), GGUF, roughly 3.4 GB at Q4_0 with quantization-aware training.
- LFM2.5 2.6B (Liquid AI), GGUF, roughly 1.7 GB at Q4_K_M.
- Qwen3.8 27B for MLX (Alibaba), about 16 GB in a 4-bit MLX build.
The first two models can fit on an iPhone; Qwen3.8 27B runs on a Mac with 32 GB of memory or more. Selecting an MLX model is a single-line change in code. Very large models such as GLM-5.3 (Z.ai) in BF16 can require on the order of 1.5 TB and are typically accessed via Inference Providers.
Upgrading and community contributions
The release notes and migration guides for AnyLanguageModel, swift-huggingface, and swift-xet explain changes and help with updating existing apps. The project maintainers credit community feedback and contributions for shaping many of the major features.
What’s next
The team plans to extend the same device-first, model-choice approach to other capabilities beyond text: familiar Swift APIs paired with selectable models running locally. Upcoming additions mentioned include models for decision-making and models that can listen.
Key repositories and resources include the AnyLanguageModel, swift-huggingface, and swift-xet GitHub projects and their respective READMEs and release notes for implementation details.



