Repository navigation
@subrouter/opencode@0.5.0
-
Pin reasoning effort from preset
#variantentries. OpenCode applies that pin on the live SDK unless the session already set--variantorsubrouter/<name>#high. The plugin publishes the first live candidate's variants so the OpenCode picker can change effort per session. If the live fallback does not list that session variant, Subrouter uses the candidate pin or the provider default. -
Show the in-flight routed model through
resolveLiveModel({ preset, sessionID }). The powered-by system line uses the provider/model that accepted the current run. After failover, later calls in the same session keep showing that fallback until idle. -
Keep each user message on the subscription that accepted it. Tool-result follow-ups stay on that provider, model, and account even if a higher-ranked subscription leaves cooldown mid-run.
-
Prefer
apply_patchwhen Subrouter routes to GPT. Presets that would otherwise look likeopenai-onlynow spoof a uniquegpt-*API id so OpenCode hidesedit/write. Custom agent prompts also get the apply_patch constraint when the live model is GPT. -
Replay encrypted reasoning on Codex and Grok follow-up turns. The plugin marks a preset as a reasoning model when the first live candidate is one, so thinking variants stay available. RouterModel copies Subrouter provider options onto the live SDK and requests
reasoning.encrypted_contentwithstore: false. -
Persist cooldown fallback notices during the active run using OpenCode's
noReplyand ignored-text pattern. The notice no longer racessession.idleand cannot become the parent of another assistant turn.