Claude Code: "model isn't recognized, context assumed 200k"

Updated 10 November 2026

If you point Claude Code at a model that isn't one of Anthropic's, it can print a note like this:

model "qwen3.8:27b" isn't recognized · context assumed to be 200k tokens · update Claude Code, or see https://code.claude.com/docs/en/model-config

What it means

Claude Code keeps a catalog of model names and their context-window sizes, and it only knows Anthropic's. For any other name it can't look the window up, so it assumes 200K tokens. Nothing is broken and your requests still work. The cost is timing: Claude Code decides when to compact (summarise) your conversation from that number. If your real window is smaller than 200K it can send a conversation that's too long (you'd then see a context_length_exceeded error). If it's larger, it compacts earlier than it needs to and throws away context you could have kept.

The fix: tell it the real window

Set CLAUDE_CODE_MAX_CONTEXT_TOKENS to your model's actual context size, in tokens. Free and pass plans have a 128K window (131072) and monthly plans 256K (262144); your plan's value is on the Plan page. The setup command in the dashboard already includes the right one. The block below uses 131072, the smallest window any plan has, so it is safe everywhere; swap in 262144 if you're on a monthly plan:

cat > ~/.nevermetered-claude.sh <<'EOF'
nevermetered-claude() {
  ANTHROPIC_BASE_URL="https://api.nevermetered.com" \
  ANTHROPIC_AUTH_TOKEN="YOUR_API_KEY" \
  ANTHROPIC_MODEL="qwen3.8-27b" \
  ANTHROPIC_DEFAULT_OPUS_MODEL="qwen3.8-27b" \
  ANTHROPIC_DEFAULT_SONNET_MODEL="qwen3.8-27b" \
  ANTHROPIC_DEFAULT_HAIKU_MODEL="qwen3.8-27b" \
  CLAUDE_CODE_SUBAGENT_MODEL="qwen3.8-27b" \
  API_TIMEOUT_MS="600000" \
  CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC="1" \
  CLAUDE_CODE_MAX_OUTPUT_TOKENS="32000" \
  CLAUDE_CODE_MAX_CONTEXT_TOKENS="131072" \
  claude "$@"
}
EOF
chmod 600 ~/.nevermetered-claude.sh
case "$SHELL" in *zsh) rc=~/.zshrc ;; *) rc=~/.bashrc ;; esac
grep -qsF '.nevermetered-claude.sh' "$rc" || echo '. ~/.nevermetered-claude.sh' >> "$rc"
. ~/.nevermetered-claude.sh
nevermetered-claude

On any other backend (a local server, another provider) set the same variable to that model's window:

export CLAUDE_CODE_MAX_CONTEXT_TOKENS=131072  # your model's real context window, in tokens
claude
The note may still print after you set the variable. It's informational: the catalog still doesn't know the model name. What changes is the number Claude Code uses to decide when to compact.

Check it's using the right model and window

  1. 1

    Start the right command

    Run nevermetered-claude (or your own variant), not plain claude, which is deliberately left alone.

  2. 2

    Ask Claude Code for its status

    Type /status inside a session. It lists the base URL and model in use. The base URL should be https://api.nevermetered.com.

  3. 3

    Make a request and look at the dashboard

    Send one prompt. It appears on the Requests page within a few seconds, with the model name qwen3.8-27b.

A related mistake: the model name itself

NeverMetered's model id is qwen3.8-27b, with a hyphen. Some local tools write the same model with a colon (qwen3.8:27b). Asking for the colon spelling here returns a 404 model_not_found that names the right id. Claude Code also asks for its own claude-* names for the main loop, subagents and background tasks, so all the model variables have to point at the same id. That's why the setup block sets several. Details in fix API errors.

Will updating Claude Code make the note go away?
Only if a newer version adds your model to its catalog, which won't happen for models Anthropic doesn't ship. Setting the context variable is the dependable fix.
What happens if I don't set it?
Claude Code assumes 200K. On a window that's larger it compacts earlier than needed. On a smaller one it can build a conversation that's too long and the API returns context_length_exceeded.
Is there a separate setting for subagents?
Yes: CLAUDE_CODE_SUBAGENT_MODEL picks the model subagents use. The NeverMetered setup sets it to the same model, so subagents don't ask for a Claude model name that doesn't exist here. Remember that each subagent is its own request: see how parallel streams work.
Sources