Merged
Conversation
Contributor
atdrendel
commented
Mar 18, 2026
- Add Devstral and Ministral
- Add Nemotron
- Add Qwen3.5
- Append assistant tool calls to transcripts to fix tool calling
There was a problem hiding this comment.
Pull request overview
This PR expands SHLLM’s model surface area (Devstral/Ministral, Nemotron, Qwen3.5) and adjusts parsing + transcript construction to support multi-step tool workflows more reliably.
Changes:
- Add new model wrappers + response parsers for Mistral3VLM (Devstral/Ministral), NemotronHModel, and Qwen3.5 (incl. MoE).
- Update tool-workflow tests to append assistant tool-call messages into transcripts before appending tool results.
- Bump MLX Swift LM dependency and switch
swift-transformersto theshareupfork.
Reviewed changes
Copilot reviewed 20 out of 22 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| bin/download.sh | Adds new model IDs for download helper script. |
| Tests/SHLLMTests/Models/Qwen3_5-9BTests.swift | New test suite for Qwen3.5-9B (streaming/awaiting/tools/VLM). |
| Tests/SHLLMTests/Models/Qwen3_5-35B-A3BTests.swift | New test suite for Qwen3.5-35B-A3B (MoE) workflows. |
| Tests/SHLLMTests/Models/Qwen3_5-2BTests.swift | New test suite for Qwen3.5-2B including thinking on/off behavior. |
| Tests/SHLLMTests/Models/Qwen3_5-27BTests.swift | New test suite for Qwen3.5-27B workflows. |
| Tests/SHLLMTests/Models/Qwen3-8BTests.swift | Ensures assistant tool calls are appended before tool results in tool workflows. |
| Tests/SHLLMTests/Models/Qwen3-4BTests.swift | Same transcript fix for Qwen3-4B tool workflows. |
| Tests/SHLLMTests/Models/Qwen3-30BTests.swift | Same transcript fix for Qwen3-30B tool workflows. |
| Tests/SHLLMTests/Models/Orchestrator-8BTests.swift | Same transcript fix for Orchestrator tool workflows (tests remain disabled where applicable). |
| Tests/SHLLMTests/Models/NemotronNano-30BTests.swift | New test suite for Nemotron Nano tool workflows. |
| Tests/SHLLMTests/Models/Ministral-3-14BTests.swift | New test suite for Ministral-3-14B including VLM extraction. |
| Tests/SHLLMTests/Models/LFM2-8B-A1BTests.swift | Appends assistant tool calls and re-enables multi-tool workflow test. |
| Tests/SHLLMTests/Models/Devstral2Small-24BTests.swift | New test suite for Devstral2 Small 24B (Mistral3VLM). |
| Tests/SHLLMTests/Helpers.swift | Minor wording tweak in image input system prompt. |
| Tests/SHLLMTests/HarmonyTests.swift | Adds missing MLXLMCommon import (ToolCall usage). |
| Sources/SHLLM/UserInput+SHLLM.swift | Adds appendAssistantToolCall and changes generic tool-result message content to JSON string. |
| Sources/SHLLM/ThinkingTagProcessor.swift | Adds documentation clarifying parsing modes. |
| Sources/SHLLM/SHLLM.swift | Re-exports new model types (Mistral3TextModel, NemotronHModel, Mistral3VLM, Qwen35, Qwen35MoE). |
| Sources/SHLLM/ResponseParser.swift | Adds parsers for Qwen3.5, Nemotron, Mistral3VLM (and shared Qwen3.5 parser selection). |
| Sources/SHLLM/LLM.swift | Adds new model constructors + resource directory helpers for Devstral2/Ministral/Nemotron/Qwen3.5. |
| Package.swift | Bumps mlx-swift-lm and switches swift-transformers dependency source/version. |
| Package.resolved | Updates resolved graph to match new dependency versions/sources. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
Comment on lines
+5
to
+17
| mutating func appendAssistantToolCall(_ call: ToolCall) { | ||
| ensureMessagesForm() | ||
| let message: Message = [ | ||
| "role": "assistant", | ||
| "tool_calls": [[ | ||
| "type": "function", | ||
| "function": [ | ||
| "name": call.function.name, | ||
| "arguments": call.function.arguments | ||
| .mapValues { $0.anyValue }, | ||
| ] as [String: Any], | ||
| ]], | ||
| ] |
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.