What
- A failed model switch now returns a machine-readable
code. The code is one ofalias_1m_disabled,alias_1m_unsupported,restricted_by_org,unavailable_for_account,not_offered,check_failedor, when a hook blocked the switch,blocked_by_hook. A hook is a command you configure to run on events. - Error messages mention
/modelonly where that command exists. Elsewhere, they say "Switch to a different model." or just "Try again." Before, they always said to run/model. - The "Couldn't confirm model" error is now marked retryable.
- A model picked at launch, for example by the SDK or in print mode (
-p), is no longer checked against the server. The switch passesconfirmWithServer: false, which becomesserverProbe: false, and the model is accepted as valid. The server check is also skipped when no deadline is given. - The print and SDK session now reports when a pick is a launch pick (
isLaunchModelPick).
Why
The SDK is the library for running Claude Code from your own programs, and programs that embed Claude Code often have no /model command. Those hosts now get messages that make sense and a code they can act on. Starting with a model chosen at launch no longer waits on a server check, which matters most on a slow network.