Command flag--variant not supported by the Opencode CLI latest version (v2.3.0)
When Opencode is used as agent executor and prompt is submitted in a chat it returned an error. There is a following error in the log:
platform-1 | 2026/11/16 15:15:02 assistant CLI session=afdmwqfb0lz73b: exit status 1; stderr=ERROR | Unrecognized flag: --variant in command opencode run
platform-1 | 2026/11/16 15:15:02 assistant title summary skipped session=chat-28b75d079d7efe9870d7274a25b5ba39: exit status 1; stderr=ERROR | Unrecognized flag: --variant in command opencode run
UI does not offer to set effort level for the chosen Opencode model used in a chat.
Current Opencode version does not support --variant for the command:
opencode run
https://github.com/Tencent/LoopForge/blob/3e02e408b6ebdb4eca1435ca698dbaf75ac78f04/internal/runtime/provider_agentcli.go#L133
LoopForge version 0.3.8
Thanks for the report! As I understand it, when OpenCode is used as the chat executor, LoopForge passes --variant to opencode run, and OpenCode CLI v2.3.0 rejects that flag (Unrecognized flag: --variant), so submitting a prompt fails. You also noted that the UI does not offer an effort level for the selected OpenCode model.
We've seen this and will look into it through the regular issue queue. The log, the OpenCode version, and the code reference are helpful. Please add the LoopForge version (image tag or commit) on this issue — that part is not in the report yet.
I will investigate the OpenCode v1/v2 run argument compatibility reported here, including preserving v1 behavior and checking the v2 CLI before proposing a focused fix.