From a4c617f6d4998fcc14007267f11949e15976c24c Mon Sep 17 00:00:00 2001 From: alexey1312 Date: Sun, 18 Jan 2026 22:08:27 +0500 Subject: [PATCH 1/2] Fix mlx-swift-lm dependency to use semantic versioning Replace `branch: "main"` with `from: "2.29.3"` for mlx-swift-lm dependency. This fixes SPM dependency resolution failures when consumers use AnyLanguageModel with semantic versioning (e.g., `from: "0.5.3"`). The branch-based dependency is incompatible with version-based transitive dependency resolution. --- Package.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Package.swift b/Package.swift index b98e91c..343a54e 100644 --- a/Package.swift +++ b/Package.swift @@ -33,7 +33,7 @@ let package = Package( .package(url: "https://github.com/mattt/JSONSchema", from: "1.3.0"), .package(url: "https://github.com/mattt/llama.swift", .upToNextMajor(from: "2.7484.0")), .package(url: "https://github.com/mattt/PartialJSONDecoder", from: "1.0.0"), - .package(url: "https://github.com/ml-explore/mlx-swift-lm", branch: "main"), + .package(url: "https://github.com/ml-explore/mlx-swift-lm", from: "2.29.3"), .package(url: "https://github.com/swiftlang/swift-syntax", from: "600.0.0"), ], targets: [ From 081d36fe2b0733e442d0a3b3dc5f7781ef08d54e Mon Sep 17 00:00:00 2001 From: Mattt Zmuda Date: Mon, 19 Jan 2026 10:38:37 -0800 Subject: [PATCH 2/2] Relax mlx-swift-lm requirements to 2.25.5 --- Package.resolved | 2 +- Package.swift | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Package.resolved b/Package.resolved index 9916dd1..df53925 100644 --- a/Package.resolved +++ b/Package.resolved @@ -1,5 +1,5 @@ { - "originHash" : "268e14d0644cbc22fdd80ecba0d8aef0cf7a4fcaa635e7ea46197cf462ba5b6b", + "originHash" : "e05268408778ca0a95c744c8471c1c10d8373df262dd9a5bf349b4e4d7eefc31", "pins" : [ { "identity" : "eventsource", diff --git a/Package.swift b/Package.swift index 343a54e..88e273c 100644 --- a/Package.swift +++ b/Package.swift @@ -33,7 +33,8 @@ let package = Package( .package(url: "https://github.com/mattt/JSONSchema", from: "1.3.0"), .package(url: "https://github.com/mattt/llama.swift", .upToNextMajor(from: "2.7484.0")), .package(url: "https://github.com/mattt/PartialJSONDecoder", from: "1.0.0"), - .package(url: "https://github.com/ml-explore/mlx-swift-lm", from: "2.29.3"), + // mlx-swift-lm must be >= 2.25.5 for ToolSpec/tool calls and UserInput(chat:processing:tools:). + .package(url: "https://github.com/ml-explore/mlx-swift-lm", from: "2.25.5"), .package(url: "https://github.com/swiftlang/swift-syntax", from: "600.0.0"), ], targets: [