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
{{ message }}
Repository navigation
[FEATURE]: Plugin can change the active model and have it stick #18667
I have verified this feature I'm about to request hasn't been suggested before.
I've been working on a plugin that dynamically routes prompts to different models based on task type. The chat.message hook already lets me mutate output.message.model — which is great — but the change only lasts for that single turn. After the prompt completes, the model picker reverts to whatever was selected before, and the next turn uses the old model again.
What I actually need: when my plugin changes the model, it should change it for real. The model picker should update, future turns should use it, and subagents should inherit it.
I put together tests for the inheritance chain (chat-message-model-routing.test.ts) and everything flows correctly within a single turn — user message → assistant → subagent. The missing piece is persisting the active model state so it carries over.
This is related to #17870 (subagents ignoring parent model) but takes it a step further — I want plugins to be able to actually set the model, not just observe it.
Not a duplicate of #16932 — that proposes a new hook for blind benchmarking. This is about making the existing hook actually update the active model.
Activity
feat: add chat.model hook with reference token-optimizer plugin
github-actions commentedon Jul 4, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.