A PreModelSwitch hook can block or hold your /model change for confirmation.
What's wrong with this entry?
Running /model with a model name now consults any registered model-switch hooks before the model changes. A hook can block the switch outright, in which case you see "model switch blocked by a PreModelSwitch hook" and are told to run /model to confirm, or it can answer "ask", which leaves the model unchanged and directs you to /model interactively. Hooks can also attach their own messages to the confirmation, so a switch that needs a second look explains why instead of failing silently.
- Only engaged when model-switch hooks are registered by the caller; with none registered, switching behaves exactly as before.
- A hook answering "ask" changes nothing and defers to the interactive
/modelpicker. - The check on whether a model is available now gives up and reports "Couldn't confirm model '" rather than hanging indefinitely when it stalls.
Couldn't confirm model ', model switch blocked by a PreModelSwitch hook
Strings lifted out of the shipped bundle, so the claim above can be checked against them.
Related
Other releases about the same thing. Found by shared names or similar wording; neither means one caused the other.
-
v2.1.234
SessionEnd hooks lose the
bypass_permissions_disabledreasonBoth mention hook
-
v2.1.236
Hooks and Ctrl-C go quiet once shutdown has started
Both mention hook
-
v2.1.236
Shutdown seals transcript writes and gives SessionEnd hooks more time
Both mention hook