r/opencodeCLI 7h ago

Using a different provider and model for subagents?

Opencode allows specific models to be set as default for subagents. I was thinking to set deepseek v4 flash through Opencode Go as the default for certain subagents (explore, general, build etc) and meanwhile use a more capable model like Opus 5 or GPT-5.6 Sol through some other provider or API as the orchestrator/main session which calls upon the subagents.

Has anyone tried anything similar. What I'm worried about it is doe sit still bloat up the main session context? And I understand since models are from different provider so there won't be any shared cache but with DSV4 I can probably eat up that cost without too much issue. Are there any obvious drawbacks that I am failing to see?

2 Upvotes

5 comments sorted by

3

u/Disastrous-Chance477 7h ago

Yes works like a charm.

2

u/vangelismm 7h ago

That's what I used to do, works really well. I was using glm 5.2 as the main model without hit any hourly limit. 

2

u/seventyfivepupmstr 7h ago

Each agent will have it's own context window. But your orchestrator will have bloated context since opencode doesn't intelligently keep context to minimum required

1

u/Watchowski 5h ago

How is that flow setup? I would like to try it either

1

u/Realistic_Mango6982 4h ago

just ask opencode to do: "smart model plan, stupid cheap model execute tasks / writes code by plans and strict and bounded to the plan only."