fix(agents): preserve 3-segment model IDs (lmstudio/qwen/model-name)#772
Merged
zaxbysauce merged 4 commits intomainfrom May 6, 2026
Merged
fix(agents): preserve 3-segment model IDs (lmstudio/qwen/model-name)#772zaxbysauce merged 4 commits intomainfrom
zaxbysauce merged 4 commits intomainfrom
Conversation
Only auto-split the last slash-segment as a reasoning-effort variant when it matches a known variant token (low/medium/high/thinking). Model IDs with a genuine third path component such as lmstudio/qwen/qwen3.6-35b-a3b are no longer truncated, fixing the ProviderModelNotFoundError reported in the issue. Adds KNOWN_VARIANT_VALUES set in src/agents/index.ts, updates the variant field comment in src/config/schema.ts, and adds three regression tests in tests/unit/agents/factory.test.ts. Agent-Logs-Url: https://github.com/zaxbysauce/opencode-swarm/sessions/9d86d583-f437-4748-9eb4-86f8d645b02b Co-authored-by: zaxbysauce <10211642+zaxbysauce@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix local agent spawning issue in Swarm
fix(agents): preserve 3-segment model IDs (lmstudio/qwen/model-name)
May 6, 2026
…hile preserving multi-segment model IDs (#773) * chore: plan variant whitelist broadening Agent-Logs-Url: https://github.com/zaxbysauce/opencode-swarm/sessions/873d035c-d227-478a-89e0-a455910e5b06 Co-authored-by: zaxbysauce <10211642+zaxbysauce@users.noreply.github.com> * fix(agents): include max and xhigh in embedded variant allowlist Agent-Logs-Url: https://github.com/zaxbysauce/opencode-swarm/sessions/873d035c-d227-478a-89e0-a455910e5b06 Co-authored-by: zaxbysauce <10211642+zaxbysauce@users.noreply.github.com> * test(agents): cover max/xhigh variants and 4-segment split semantics Agent-Logs-Url: https://github.com/zaxbysauce/opencode-swarm/sessions/873d035c-d227-478a-89e0-a455910e5b06 Co-authored-by: zaxbysauce <10211642+zaxbysauce@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: zaxbysauce <10211642+zaxbysauce@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.
Any model ID with 3+ slash-separated segments was unconditionally treated as
provider/model/variant— the last segment was stripped and injected as thevariantfield. LM Studio model IDs likelmstudio/qwen/qwen3.6-35b-a3bwere silently rewritten tomodel: "lmstudio/qwen"+variant: "qwen3.6-35b-a3b", causingProviderModelNotFoundErrorat spawn time.Changes
src/agents/index.ts— addsKNOWN_VARIANT_VALUES = new Set(['low', 'medium', 'high', 'max', 'xhigh', 'thinking']). The auto-split inapplyOverrides()now only fires when the trailing segment is a known reasoning-effort token:src/config/schema.ts— updates thevariantfield comment to document the whitelist behaviour and the LM Studio counter-example.docs/configuration.md— updates thevariantfield description to list all six known tokens.docs/releases/v7.5.3.md— release notes for the fix.tests/unit/agents/factory.test.ts— adds three regression tests:lmstudio/qwen/qwen3.6-35b-a3bis passed through unchangedlow,medium,high,max,xhigh,thinkingstill trigger the deprecation split (backward compat preserved), including a 4-segment model (gateway/ns/gpt-5.3-codex/medium)Scope note
Commit
b739e80cwas cherry-picked from the already-merged PR #773, which broadened the variant allowlist withmaxandxhighand added the 4-segment split test case.