mrkeyoor.com_
Tue 20 Oct 15:58 UTC
Open Source3 min read

AnyLanguageModel 1.0 Changes Encoding for Swift Enums With Associated Values

AnyLanguageModel 1.0 changes generated enums with associated values. Earlier content won't decode, so apps that save it need to check their stored responses before upgrading.

AnyLanguageModel 1.0 changes the encoding of generated Swift enums with associated values. The release notes warn that content generated by an earlier version won't decode. For apps that retain those responses, the upgrade needs a saved-data check.

AnyLanguageModel gives Swift developers a Foundation Models-style interface for Apple's system model, local inference engines and hosted providers. The 1.0.0 release was published on October 13, 2026. This report examines the supplied release notes, versioned README and maintained announcement text. No compilation or app migration was tested.

What changes for saved responses

The change affects @Generable enums whose cases carry associated values. Version 1.0 follows Apple's Foundation Models representation: one object per case, with a type identifying the case and a typed property for each associated value, according to the release notes.

For an app that stores this generated content, a successful build alone would not establish whether old records remain readable. Before upgrading, keep representative saved responses and check how the new decoder handles them. This is a recommendation based on the release warning, rather than a measured migration result. Whether an app needs to convert historical records depends on what it has retained.

A second breaking change replaces the JSONSchema.JSONValue alias with AnyLanguageModel's own JSONValue type. It retains the same cases, accessors and literal conformances, but not description, string interpolation or isCompatible(with:strict:). Code exchanging values between those two types now needs explicit conversion. The same release notes also require swift-huggingface 1.0.

Check backend setup separately

Hugging Face's maintained announcement text describes tool calling and guided generation across providers as work accumulated over the past year. Those capabilities should not all be treated as additions made specifically in 1.0.

The README at tag 1.0.0 requires Swift 6.3 or later and lists Xcode 26.4 or later. No package traits are enabled by default. Developers select CoreML, MLX or Llama for the corresponding local backends.

The tagged README also documents setup limitations. Enabling traits may cause dependency resolution to fail with "exhausted attempts to resolve the dependencies graph." Its workaround is to add the underlying dependencies for the enabled traits directly to the package. For Xcode projects, it describes an internal Swift package as a workaround for Xcode's lack of built-in trait configuration.

For an existing app, start with retained enum responses and places where values cross between the two JSONValue types. Check those alongside the backend configuration before shipping the dependency update.

Sources

  1. AnyLanguageModel 1.0.0 release notes
  2. GitHub release metadata for AnyLanguageModel 1.0.0
  3. Hugging Face's maintained source for the AnyLanguageModel 1.0 announcement
  4. AnyLanguageModel README at version 1.0.0