Skip to content
worth noting Local AI

AnyLanguageModel 1.0 unifies access to local and hosted models

clearly official source

AnyLanguageModel 1.0 for Swift has been released. The same session code supports the system model, local models and hosted services. According to the authors, tool calling and structured generation work across all providers. The library also runs on Linux.

AnyLanguageModel 1.0 has been released, providing access to local and hosted models through a common API for Swift. It builds on the Foundation Models interface: after changing the import, the same session code can be used with the system model, local models through llama.cpp, MLX and Core ML, and hosted services.

According to the authors, all providers support tool calling, including streaming output, and structured generation, including nested @Generable types and arrays of those types. The library also allows images to be attached to prompts using Foundation Models 27 syntax; for the system model, this capability is available on iOS, macOS and visionOS version 27.

Supported services include APIs from OpenAI, Anthropic and Google, Hugging Face Inference Providers, and other compatible interfaces. The library also runs on Linux, allowing the same code to run on a server. It now retrieves API keys through a function instead of a fixed string, allowing the application to fetch short-lived tokens from its own server.

The choice of local model remains dependent on hardware. The authors cite Qwen3.8 27B for MLX as an example: its 4-bit variant takes up approximately 16 GB and, according to the authors, runs on a Mac with at least 32 GB of memory. For models too large for a given device, Hugging Face Inference Providers can be used with the same session code.

What changed

Why it matters

Developers of Swift applications can choose between on-device processing and a hosted service based on the task and available memory while retaining a common interface. According to the authors, support for structured outputs and tool calling extends this choice to applications that need more than a text response.

Two audiences, two different impacts

What this means

01

For individuals

When comparing local and hosted models, developers can keep the same session code and change the model or provider.

What to do In a test application, test the same session with a selected local model and a hosted service.
More practical updates →
02

For a business

Enterprise access management for hosted models can use short-lived tokens issued by an internal server, as the library now retrieves API keys through a function.

Development
What to decide Evaluate integrating your own server to issue short-lived tokens, following the recommendations in the library documentation.
More business impacts →
AnyLanguageModel Core ML foundation-models llama.cpp MLX Swift

Check the original

Event sources

clearly official source · 1 publisher, 0 independent. We count feeds from the same owner only once.

1
Hugging Face Blog primary source · first detected AnyLanguageModel 1.0: One Year of Local Models on Apple Platforms