Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
167 changes: 167 additions & 0 deletions Package.resolved

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 19 additions & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,24 @@ var packageDependencies: [Package.Dependency] = [

#if os(iOS) || os(macOS)
packageDependencies.append(contentsOf: [
.package(url: "https://github.com/ml-explore/mlx-swift-lm", branch: "main"),
// mlx-swift-lm v3 (PR #118 merged 2026-04-01) removed
// `loadTokenizer(configuration:hub:)` and reshaped the Hub/Downloader
// API; `LocalLLMClientMLX/Context.swift` still uses the old API. Until
// the MLX backend is migrated to v3 (`AutoTokenizer.from(directory:)` +
// `Downloader`), pin to the last pre-v3 commit so consumers can build.
// Tracked in LocalLLMClient#93 — switch back to `branch: "main"` once
// Context.swift is migrated.
.package(
url: "https://github.com/ml-explore/mlx-swift-lm",
revision: "2a296f145c3129fea4290bb6e4a0a5fb458efa06" // 2026-03-27, last pre-v3
),
// `Tokenizers` (from swift-transformers) is what `LocalLLMClientMLX`
// imports for `any Tokenizer`. Pre-v3 mlx-swift-lm transitively pulled
// swift-transformers in, but its Package.swift didn't declare it as a
// public re-export, so consumers still need to depend on it directly.
// Range matches the pre-v3 mlx-swift-lm transitive pin so SPM resolves.
// Bump to `from: "1.3.0"` once Context.swift is migrated to mlx-swift-lm v3.
.package(url: "https://github.com/huggingface/swift-transformers.git", "1.2.0"..<"1.3.0"),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The range literal "1.2.0"..<"1.3.0" is interpreted as a Range<String>, which will cause a compilation error because the package(url:_:) method expects a Range<Version>. To fix this and maintain consistency with the existing dependencies in this file (such as lines 11 and 12), use .upToNextMinor(from: "1.2.0").

Suggested change
.package(url: "https://github.com/huggingface/swift-transformers.git", "1.2.0"..<"1.3.0"),
.package(url: "https://github.com/huggingface/swift-transformers.git", .upToNextMinor(from: "1.2.0")),

.package(url: "https://github.com/apple/swift-docc-plugin", from: "1.4.0")
])
#endif
Expand Down Expand Up @@ -135,6 +152,7 @@ packageTargets.append(contentsOf: [
"LocalLLMClientCore",
.product(name: "MLXLLM", package: "mlx-swift-lm"),
.product(name: "MLXVLM", package: "mlx-swift-lm"),
.product(name: "Tokenizers", package: "swift-transformers"),
],
),
.testTarget(
Expand Down
Loading