AnyLanguageModel 1.0

Hugging Face's Swift library, a drop-in replacement for Apple's Foundation Models framework across local and hosted models.

Hugging Face · Developer tools and coding agents · open-source

Published in Feed

Overview

AnyLanguageModel 1.0, published by Hugging Face on October 20, 2026, is a Swift library that works as a drop-in replacement for Apple's Foundation Models framework: switch the import from FoundationModels to AnyLanguageModel and session code stays the same. It supports tool calling, guided generation including nested @Generable types, and image attachments. Local backends include the system model, llama.cpp, MLX and Core ML; hosted backends include OpenAI (Chat Completions and Responses), Anthropic Messages, Google Gemini, Ollama, Hugging Face Inference Providers and OpenAI-compatible endpoints such as OpenRouter. It also runs on Linux.

This is a sourced directory entry. Features and capabilities are reported in the linked sources; this entry does not document independent Aymorphic testing.

Key features

  • Same API as Apple's Foundation Models; change one import
  • Local backends: system model, llama.cpp, MLX, Core ML
  • Hosted backends: OpenAI, Open Responses, Anthropic, Gemini, Ollama, Hugging Face Inference Providers, OpenRouter-style endpoints
  • On OS 27: Private Cloud Compute and Core AI models via the LanguageModel protocol
  • API keys supplied through a closure so apps can fetch short-lived tokens from their own server

Use cases

  • Letting a Swift app choose between on-device and cloud models without rewriting session code
  • Running open-weight MLX models inside an iOS or macOS app

Pricing

Free and open source (github.com/huggingface/AnyLanguageModel); license not stated in the announcement.

Pricing reflects the source record and may change. Confirm current terms with the provider.

Dates and sources

Released
20 Oct 2026
Record updated
27 Oct 2026
Record last checked
27 Oct 2026

Explore the Feed

Other entries filed under developer tools and coding agents; inclusion does not imply equivalent features.

Browse the Feed