Skip to content

[FEATURE]: New chat.model hook #50729

Open

Description

@dmouse

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

Adding the chat.model hook we can modify the model on each step and extend functionality like selecting the right model to run a task.

similar old issues:

Activity

  1. github-actions commented on Sep 22, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

  2. opencodejr commented on Oct 28, 2026

    @opencodejr

    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.

    Related issues and PRs:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions