Skip to content

prepareNextTurn hook is ignored - model never swaps #577

Description

@Fletu94

Summary

The prepareNextTurn hook in Mods returns successfully but the model swap is never applied. The session model stays the same for all turns.

Expected Behavior

When prepareNextTurn returns { model: "minimax-m2.5" }, the next turn should use minimax-m2.5.

Actual Behavior

The model never changes. My usage dashboard shows deepseek-v4-flash (the session model) used for all 4 turns, even though the hook returns a different model.

Steps to reproduce the issue

cmd.hooks({
onStop: async () => {
return {
continue: true,
reason: "next prompt",
prepareNextTurn: {
model: "minimax-m2.5", // or any other model
},
};
},
});
No errors returned. The hook fires. But the model stays the same.

Command Code Version

1.3.0

Operating System

macOS

Terminal/IDE

ghostty

Shell

command

Additional context

ec68a19a-4eaf-4ee8-a987-17e7ee7aabda session

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions