You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit c63f4e9
Browse filesBrowse the repository at this point in the historyBrowse files
fix(oc): drop unsupported --variant from default opencode launch template
Follow-up to f70a34a (ntm#193). That commit's DefaultOpencodeCommand
injected `--variant <effort>` into the OpenCode launch template:
opencode{{if .Model}} --model ...{{end}}{{if .ReasoningEffort}} --variant ...{{end}}
But `--variant` is NOT a flag on the root `opencode` command — the one an
interactive agent pane launches (the TUI). It exists only on the
`opencode run` subcommand. Adding it to the root command is the still-open,
unmerged feature request anomalyco/opencode#7354 (PR #7358); the tracking
issue was auto-closed by a staleness bot after 90 days of inactivity, not by
a fix, and as of this writing the PR's `merged` field is false.
Concretely, this regressed the exact thing #193 set out to enable: any
OpenCode spawn carrying a reasoning effort — e.g. `--oc=2:provider/model:high`,
which the agent-spec parser turns into ReasoningEffort="high" and threads
through to GenerateAgentCommand — rendered
opencode --model 'provider/model' --variant 'high'
which the root `opencode` command rejects as an unknown flag, so the pane
fails to launch instead of joining cross-agent coordination.
Fix: render only `--model` (which the root command genuinely accepts and is
the primary #193 goal: makes `--oc=N:provider/model` work and gives Agent Mail
a non-empty model). ReasoningEffort is now inert for opencode and leaves no
dangling flag — verified by the updated TestDefaultAgentTemplates, which
asserts `opencode --model '...'` with model+effort and bare `opencode` with
neither. The other #193 pieces are sound and unchanged: GetProfileByName/
AllProfiles return deep copies (confirmed in profiles.go copy()), so
effectiveAgentModel overwriting .Model for display does not mutate shared
matcher state; the effectiveAgentModel config→static fallback chain is correct
for every profile type; and opencodeCommandOrDefault behaves identically at all
five call sites. Stale "model/variant-aware" comments updated to "model-aware".
go build/vet/gofmt clean; config + cli + agents suites green; robot
restart/launch tests green (full robot package only times out under VPS load,
unrelated to this change).
Co-Authored-By: Claude <[email protected]>
0 commit comments