You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for the request, @dmouse! You're asking for a v2 plugin hook that can pick or replace the model before each step of a turn, so a plugin can route simple steps to cheaper models and complex work to stronger ones.
The current v2 plugin API can't do this. Session hooks such as context, model.request and http.request get the model as read-only, and it's resolved before they run. The only option a plugin has is session.switchModel, which changes the session's selected model for good rather than for one step. So this needs a change to the plugin API itself, and maintainers will consider it.
Activity
github-actions commentedon Sep 22, 2026
This issue might be a duplicate of existing issues. Please check:
chat.paramshook cannot override the model (only sampling params) — model-switch plugins are forced to abort+resend, which breaks one-shotopencode runcallers #49712: Plugins:chat.paramshook cannot override the model — model-switch plugins are forced to abort+resend (open, directly related)opencodejr commentedon Oct 28, 2026
Thanks for the request, @dmouse! You're asking for a v2 plugin hook that can pick or replace the model before each step of a turn, so a plugin can route simple steps to cheaper models and complex work to stronger ones.
The current v2 plugin API can't do this. Session hooks such as
context,model.requestandhttp.requestget the model as read-only, and it's resolved before they run. The only option a plugin has issession.switchModel, which changes the session's selected model for good rather than for one step. So this needs a change to the plugin API itself, and maintainers will consider it.Related issues and PRs:
model.selecthook for per-step routingchat.modelrequests, which were against v1