Support OpenCode V2 in unsloth start - #9275
Conversation
for more information, see https://pre-commit.ci
|
Confirmed main's unsloth_cli/commands/start.py still resolves only opencode and injects a root --model, so the V2 routing here fills a real gap. Could you keep .github/scripts/agent-guides-install.sh covering the stable opencode-ai install as well instead of replacing it with the beta package? |
@danielhanchen done. |
|
Addressed the runtime review findings in 0fdf8da:
Validation: 73 targeted OpenCode tests, pre-commit hooks, Python compilation, workflow lint, and a real opencode2 models --standalone smoke. |
|
Thanks — I tested this at
Repros: https://github.com/wasimysaid/unsloth/actions/runs/32264293049 and https://github.com/wasimysaid/unsloth/actions/runs/32264440159. Could you re-check both command-building paths and add coverage? The private-server/models and provider-policy behavior worked for me. |
|
Fixed both paths in b38bf61. The V2 resolver now preserves the absolute ~/.opencode/bin/opencode2 path in --no-launch output, so the printed recipe no longer depends on PATH. Explicit V2 subcommands now place --standalone after the subcommand (opencode2 run --standalone ...), and the guide driver repositions the bare recipe's flag when it appends |
|
@codex review |

Summary
Why
OpenCode V2 installs side by side as opencode2 and changes its CLI/server contracts. The current integration only resolves opencode, injects a root --model flag that V2 rejects, and parses the V1 debug config response shape for subagents.
Reference: https://opencode.ai/v2/docs/migrate-v1
Testing