{"version":"2.1.281","anchor":"model-switch-rejections-now-return-a-machine-readable-code","canonical_anchor":"model-switch-rejections-now-return-a-machine-readable-code","heading":"Model switch rejections now return a machine-readable code","tier":"notice","area":"SDK","url":"https:\/\/changelogs.core-directive.com\/v\/2.1.281\/e\/model-switch-rejections-now-return-a-machine-readable-code","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.281","markdown":"### Model switch rejections now return a machine-readable code\n\nA blocked model switch now returns a `code` field naming the reason, such as `restricted_by_org` or `catalog_unknown`\n\n**What**\n\nWhen a request to switch models is refused, the result now carries a `code` field. The field is meant to be read by software rather than by people. The values seen are:\n\n- `catalog_unknown`: the model is not a known one.\n\n- `unavailable_for_account`: the model is not available to the account.\n\n- `restricted_by_org`: the organization blocks it.\n\n- `auth_failed`: authentication failed.\n\n- `check_failed`: the check of what the account is entitled to failed.\n\n**Why**\n\nPrograms that drive Claude Code can tell why a model switch failed without parsing the text of the error message.\n\n- Area: SDK\n- Tier: You'll notice\n- Useful: 1\/5\n- Signal: 1\/5"}