{"version":"2.1.317","anchor":"new-model-restriction-field-on-sdk-system-warning-message","canonical_anchor":"new-model-restriction-field-on-sdk-system-warning-message","heading":"SDK warnings now say which model was refused and which one is used instead","tier":"notice","area":"SDK","scope":"both","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.317\/e\/new-model-restriction-field-on-sdk-system-warning-message","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.317","markdown":"### SDK warnings now say which model was refused and which one is used instead\n\nThe SDK warning sent when a requested model is refused now carries a `model_restriction` field naming both models and when it happened\n\n**What**\n\nThe SDK lets other programs run Claude Code and read its messages. When a requested model is refused and the session uses a different one, the warning message now includes an optional `model_restriction` object with:\n\n- `requested_model`: the model that was asked for\n\n- `effective_model`: the model actually used\n\n- `at`: when it happened, one of `start`, `switch` or `resume`\n\n**Why**\n\nA program built on the SDK can show its own wording for a model restriction instead of picking the details out of the warning text.\n\n- Area: SDK\n- Names: `model_restriction`\n- Tier: You'll notice\n- Useful: 3\/5\n- Signal: 2\/5\n- Scope: both\n- Heads-up: no"}