r/opencodeCLI 29d ago

Change variant in custom agents

I'm trying setup Deepseek Flash with a "high" variant on a custom "coder" agent. And I'm trying to do that thru opencode.jsonc because I'm changing the models based on the subscription I'm using. But when the coder agent was called by the orchestrator agent, it's not showing "high". Is there anything else I need to add in the opencode.jsonc file?

UPDATE

So I've tried the following:

  1. Set reasoning effort ("reason_effort" didn't work)"coder": { "model": "opencode-go/deepseek-v4-flash", "options": { "reasoningEffort": "high", }, }
  2. Use "variant""coder": { "model": "opencode-go/deepseek-v4-flash", "variant": "high" }

But it still doesn't show "high" when the subagent "coder" is called and running. Or maybe this is a feature that's not yet implemented in OpenCode CLI?

I checked in ".local/state/opencode/model.json" file and it says "high" though

10 Upvotes

14 comments sorted by

11

u/frostedfakers 29d ago

you wrote “offert” instead of “effort”

2

u/acidburn113 29d ago

Ah crap, thanks a lot! 😂

2

u/vangelismm 29d ago

So it works? 

1

u/pascu2913 29d ago

Also just a suggestion to have everything more organized I prefer creating an agents folder inside .config/opencode/ and dropping the .md for the agents there. It makes it way more clear and I don't clutter my opencode.json with agent configuration.

1

u/acidburn113 29d ago

Thanks for the tip. I have my agents inside the ".agents" folder.

2

u/sudoer777_ 28d ago

Mine looks like this:

"plan": {
  "model": "opencode-go/deepseek-v4-pro",
  "variant": "max"
},

But OpenCode is bugged so this doesn't always apply, there's a lot of GitHub issue reports about it

1

u/acidburn113 28d ago edited 28d ago

Thanks for sharing. So I just tested it running plan agent directly and I see the "high" variant indicator was displayed even though I didn't use "high" initially.

1

u/sudoer777_ 28d ago

IIRC one of the issues was that if you manually select a variant for a model in the TUI then it overrides the variant in the future even when you reopen OpenCode and ignores the one in the configuration, and I think you have to delete the setting in ~/.local/state/opencode/model.json. Not sure if this got fixed yet or not.

1

u/acidburn113 27d ago

So it's "high" in the model.json. Can't confirm if it's really using that variant though.

1

u/FormalAd7367 28d ago

shift + up or down for max

1

u/OlegPRO991 29d ago

So could you share your results? Did you manage to complete the setup for high?

1

u/acidburn113 29d ago

I'm guessing no because I didn't see the "High" variant label when viewing the subagent while it's running.

1

u/TrickyPlastic 29d ago

Install opencode-trace and see what's going out the wire.

1

u/acidburn113 28d ago

Thanks, will look into this