{"version":"2.1.299","anchor":"unknown-model-warning-is-now-a-structured-notice-with-a-ui-b","canonical_anchor":"context-window-unknown-model-enforcement-refactored-claude","heading":"Unknown-model warning becomes a visible banner, with a CLAUDE_CODE_MAX_CONTEXT_TOKENS exemption","tier":"use","area":"Elsewhere","scope":"both","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.299\/e\/unknown-model-warning-is-now-a-structured-notice-with-a-ui-b","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.299","markdown":"### Unknown-model warning becomes a visible banner, with a CLAUDE_CODE_MAX_CONTEXT_TOKENS exemption\n\nAn unrecognized model now gets a visible warning banner, and setting CLAUDE_CODE_MAX_CONTEXT_TOKENS can exempt first-party models from the check\n\n**What**\n\nThe context window is how much conversation a model can hold at once. When Claude Code does not recognize a model, it assumes a window size and compacts (summarizes older conversation) to stay within it.\n\n- The warning is no longer one plain string. It now carries the model, the assumed window, a short text and a detail.\n\n- A new 'model-unrecognized' warning shows: 'Model ... isn't recognized \u00b7 context assumed to be N tokens \u00b7 update Claude Code, or see the docs'. The app keeps it in a new `unknownModelWindowWarning` field next to the model deprecation warning.\n\n- Auto-compact still keeps the session within the assumed window, and `CLAUDE_CODE_DISABLE_UNKNOWN_MODEL_WINDOW_ENFORCEMENT=1` still restores the previous behaviour.\n\n- The check was moved into a separate helper. A new function exempts first-party models from it when `CLAUDE_CODE_MAX_CONTEXT_TOKENS` is set to a positive value and the model qualifies for it.\n\n**Why**\n\nPeople on a model Claude Code does not recognize, such as a gateway alias, now see a visible warning. Setting `CLAUDE_CODE_MAX_CONTEXT_TOKENS` may also change whether that warning applies.\n\n- Area: Elsewhere\n- Tier: Use it now\n- Useful: 2\/5\n- Signal: 1\/5\n- Scope: both\n- Heads-up: no"}