Apple apps get one door to local models: swap the import, keep the session code, and run system or open-weight models
Synopsis
AnyLanguageModel 1.0 turns Apple's Foundation Models interface into a replaceable layer: an app changes its import from FoundationModels to AnyLanguageModel, and the same session code can call the system model, open-weight models run through llama.cpp, MLX and Core ML, and several hosted providers. Before this, developers curious about local models were unsure how to start and wanted to avoid the added complexity of supporting multiple inference providers. Over the year the library aligned tool calling and guided generation across providers and added image input and Linux support.
Interpretation
Choosing a model becomes a matter of swapping the model source under Apple's Foundation Models interface rather than binding an app to one provider. Developers were curious about local models but unsure how to get started, and they wanted to avoid the added complexity of supporting multiple inference providers. The change lands on the import statement: replacing FoundationModels with AnyLanguageModel lets the same session code target the system model, open-weight models through llama.cpp, MLX and Core ML, and hosted providers.
Local and hosted models now share one set of capabilities, covering tool calling, guided generation and image input. These capabilities were not uniformly available across every provider before. Tool calling and guided generation work with every provider, guided generation handles nested @Generable types and arrays of them, and images can be attached to prompts, including with the system model on iOS, macOS and visionOS 27.
Hosted coverage widened, and reasoning now enters the transcript, with reasoning blocks automatically omitted from requests when a newly selected provider cannot replay them. Hosted model support was narrower, and cross-provider switching had no common handling for reasoning content. Support includes OpenAI's Chat Completions and Responses APIs, Open Responses, Anthropic's Messages API with adaptive thinking and effort options, Gemini, Ollama, Private Cloud Compute on OS 27, and Hugging Face Inference Providers and other OpenAI-compatible endpoints reached through a custom base URL.
Perspective
The report covers the release of AnyLanguageModel 1.0 together with swift-huggingface 1.0 and swift-xet 1.0, and its intended readers are app developers on Apple platforms. The model sizes and hardware thresholds given are examples: Gemma 4 E2B is about 3.4 GB at Q4_0 and LFM2.5 2.6B about 1.7 GB at Q4_K_M, both fitting on an iPhone, while the MLX build of Qwen3.8 27B is about 16 GB and runs on a Mac with 32 GB of memory or more. The release names models that decide and models that listen as coming next.
No quantitative comparison of tool-calling or guided-generation consistency across providers is given; capabilities are presented as a feature list. Hosted use through Inference Providers depends on an external endpoint for models beyond device capacity, a line the text draws with GLM-5.3 at about 1.5 TB in BF16. API keys now come from a closure so apps can fetch short-lived tokens, but when to let people bring their own keys and when to route through a proxy is deferred to the README.
