Conversation
There was a problem hiding this comment.
Pull request overview
Updates SHLLM’s MLX dependency from mlx-swift-examples to mlx-swift-lm, aligning tool-call handling and related test scaffolding with the newer upstream APIs.
Changes:
- Swap SwiftPM dependency from
mlx-swift-examplestomlx-swift-lm(and update resolved pins). - Migrate LFM2 tool-call handling away from a custom response parser to configuration-based formatting (
toolCallFormat = .lfm2) and remove the old parser/Python helper + their unit tests. - Update tokenizer/tool test utilities to match newer
TokenizersAPI surface (e.g.,ToolSpec,any Sendablecontexts).
Reviewed changes
Copilot reviewed 10 out of 11 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| Tests/SHLLMTests/TruncatingUserInputProcessorTests.swift | Updates the test tokenizer stub to satisfy newer Tokenizer requirements (e.g., callAsFunction, hasChatTemplate, any Sendable additionalContext). |
| Tests/SHLLMTests/Tool+SHLLMTests.swift | Updates test tool schemas to return ToolSpec and adapts nested dictionaries for any Sendable. |
| Tests/SHLLMTests/PythonTests.swift | Removes Python parser unit tests (file deleted). |
| Tests/SHLLMTests/Models/LFM2-8B-A1BTests.swift | Switches LFM2 tests to configure .lfm2 tool-call format rather than providing a custom response parser. |
| Tests/SHLLMTests/LFM2ParserTests.swift | Removes LFM2 parser unit tests (file deleted). |
| Sources/SHLLM/SHLLM.swift | Switches cache management from MLX.GPU to Memory. |
| Sources/SHLLM/ResponseParser.swift | Removes the LFM2-specific response parser implementation. |
| Sources/SHLLM/LLM.swift | Updates memory logging to use Memory.activeMemory and configures LFM2 via toolCallFormat. |
| Package.swift | Bumps Swift tools version / minimum iOS+macCatalyst targets and swaps dependency to mlx-swift-lm. |
| Package.resolved | Updates dependency pins and SwiftPM resolved-file format/version. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.