Pre-flight Checks
Bug Description
Model spec strings read back from agent configs are split at the first : even when a / separator appears earlier in the string. For OpenRouter free-model specs like openrouter/qwen/qwen3.6-plus:free, this produces ProviderID=openrouter/qwen/qwen3.6-plus, ModelID=free — a broken assignment that loses the phase mapping on sync.
This is the read-path slice of #260: that issue's main symptom (the TUI/catalog writing the wrong opencode/...-free prefix via model_picker.go → inject.go) is a separate write-path bug and stays tracked there. Splitting per maintainer review in PR #374 (#374 (review)), which asked to link the colon-first parse bug this PR actually fixes.
The same first-separator logic is duplicated in three places, so the bug exists in all three:
internal/cli/sync.go (parseModelSpec)
internal/components/sdd/profiles.go (extractModelFromAgent)
internal/components/sdd/read_assignments.go (inline parser)
Steps to Reproduce
- Configure an SDD phase with an OpenRouter free model:
openrouter/qwen/qwen3.6-plus:free
- Run a sync that reads current model assignments back from the agent config
- Inspect the parsed
ProviderID/ModelID
Expected Behavior
Split at the first separator (slash or colon, whichever comes first): ProviderID=openrouter, ModelID=qwen/qwen3.6-plus:free.
Actual Behavior
Split at the first :: ProviderID=openrouter/qwen/qwen3.6-plus, ModelID=free. The assignment no longer matches any catalog entry and the phase mapping is dropped.
Operating System
Windows
Agent / Client
Claude Code
Shell
bash
Additional Context
Fix already implemented and reviewed in PR #374 (shared SplitProviderModel helper + regression tests). This issue exists to satisfy the issue-first gate after the maintainer asked to narrow that PR's scope from Closes #260 to the parse bug only.
Pre-flight Checks
Bug Description
Model spec strings read back from agent configs are split at the first
:even when a/separator appears earlier in the string. For OpenRouter free-model specs likeopenrouter/qwen/qwen3.6-plus:free, this producesProviderID=openrouter/qwen/qwen3.6-plus,ModelID=free— a broken assignment that loses the phase mapping on sync.This is the read-path slice of #260: that issue's main symptom (the TUI/catalog writing the wrong
opencode/...-freeprefix viamodel_picker.go→inject.go) is a separate write-path bug and stays tracked there. Splitting per maintainer review in PR #374 (#374 (review)), which asked to link the colon-first parse bug this PR actually fixes.The same first-separator logic is duplicated in three places, so the bug exists in all three:
internal/cli/sync.go(parseModelSpec)internal/components/sdd/profiles.go(extractModelFromAgent)internal/components/sdd/read_assignments.go(inline parser)Steps to Reproduce
openrouter/qwen/qwen3.6-plus:freeProviderID/ModelIDExpected Behavior
Split at the first separator (slash or colon, whichever comes first):
ProviderID=openrouter,ModelID=qwen/qwen3.6-plus:free.Actual Behavior
Split at the first
::ProviderID=openrouter/qwen/qwen3.6-plus,ModelID=free. The assignment no longer matches any catalog entry and the phase mapping is dropped.Operating System
Windows
Agent / Client
Claude Code
Shell
bash
Additional Context
Fix already implemented and reviewed in PR #374 (shared
SplitProviderModelhelper + regression tests). This issue exists to satisfy the issue-first gate after the maintainer asked to narrow that PR's scope fromCloses #260to the parse bug only.