Update mlx-swift-lm - #31
Merged
Merged
Conversation
- Bump mlx-swift-lm to 0.0.16 - Preserve input tool schemas when preparing loaded model input - Add model coverage for non-string tool arguments and final tool responses
Contributor
There was a problem hiding this comment.
Pull request overview
Updates SHLLM’s MLX dependencies and expands model/tooling support, including adding Gemma 4 model integration and improving tool-call argument coercion by passing tool schemas through to MLXLMCommon.generate().
Changes:
- Bump
mlx-swift-lm(and related pins) and add Gemma 4 model types/parsing support. - Pass tool schemas into generation to support non-string tool argument coercion (validated via new tests).
- Add
--verbose/-vflags tobin/build.shandbin/test.sh, plus model download list updates.
Reviewed changes
Copilot reviewed 27 out of 31 changed files in this pull request and generated 13 comments.
Show a summary per file
| File | Description |
|---|---|
| Tests/SHLLMTests/Models/Qwen3-8BTests.swift | Adds tool-call coercion test for non-string arguments. |
| Tests/SHLLMTests/Models/Qwen3-4BTests.swift | Adds tool-call coercion test for non-string arguments. |
| Tests/SHLLMTests/Models/Qwen3-30BTests.swift | Adds tool-call coercion test for non-string arguments. |
| Tests/SHLLMTests/Models/Qwen3-1_7BTests.swift | Adds tool-call coercion test for non-string arguments. |
| Tests/SHLLMTests/Models/Qwen3-0_6BTests.swift | Adds tool-call coercion test for non-string arguments. |
| Tests/SHLLMTests/Models/Qwen3_5-9BTests.swift | Adds tool-call coercion test for non-string arguments. |
| Tests/SHLLMTests/Models/Qwen3_5-4BTests.swift | Adds tool-call coercion test for non-string arguments. |
| Tests/SHLLMTests/Models/Qwen3_5-35B-A3BTests.swift | Adds tool-call coercion test for non-string arguments. |
| Tests/SHLLMTests/Models/Qwen3_5-2BTests.swift | Adds tool-call coercion test for non-string arguments (with thinking disabled). |
| Tests/SHLLMTests/Models/Qwen3_5-27BTests.swift | Adds tool-call coercion test for non-string arguments. |
| Tests/SHLLMTests/Models/Qwen2_5-7BTests.swift | Adds tool-call coercion test for non-string arguments. |
| Tests/SHLLMTests/Models/Qwen2_5-1_5BTests.swift | Adds tool-call coercion test for non-string arguments. |
| Tests/SHLLMTests/Models/Orchestrator-8BTests.swift | Adds tool-call coercion test for non-string arguments. |
| Tests/SHLLMTests/Models/NemotronNano-30BTests.swift | Adds tool-call coercion test for non-string arguments. |
| Tests/SHLLMTests/Models/Ministral-3-14BTests.swift | Adds tool-call coercion test for non-string arguments. |
| Tests/SHLLMTests/Models/LFM2-8B-A1BTests.swift | Adds tool-call coercion test for non-string arguments. |
| Tests/SHLLMTests/Models/GPTOSS-20BTests.swift | Adds tool-call coercion test for non-string arguments (Harmony helpers). |
| Tests/SHLLMTests/Models/Gemma4-E4BTests.swift | New Gemma 4 E4B model tests (text, vision, tools). |
| Tests/SHLLMTests/Models/Gemma4-E2BTests.swift | New Gemma 4 E2B model tests (text, vision, tools). |
| Tests/SHLLMTests/Models/Gemma4-12BTests.swift | New Gemma 4 12B model tests (text, vision, tools). |
| Tests/SHLLMTests/Helpers.swift | Adds mail_read tool schema + response types for tool coercion tests. |
| Tests/SHLLMTests/Gemma4ChannelParserTests.swift | Adds unit tests for Gemma 4 channel parsing behavior. |
| Sources/SHLLM/SHLLM.swift | Exports Gemma 4 model classes. |
| Sources/SHLLM/ResponseParser.swift | Adds Gemma 4 channel parser and model parser bindings. |
| Sources/SHLLM/LLM.swift | Passes tool schemas into MLXLMCommon.generate() and adds Gemma 4 entrypoints. |
| Package.swift | Bumps mlx-swift-lm version and notes Gemma 4 resources. |
| Package.resolved | Updates pinned dependency revisions/versions. |
| bin/test.sh | Adds --verbose/-v and adjusts xcbeautify usage + Metal toolchain flow. |
| bin/download.sh | Adds Gemma 4 model IDs to download list. |
| bin/build.sh | Adds --verbose/-v and adjusts xcbeautify usage. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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.
MLXLMCommon.generate()to ensure function argument types are coerced into the types expected by the tools