/model, no restart needed.
Setup
The recommended way is the Lyceum CLI.lyceum code launches Claude Code preconfigured, in its own profile that never touches an existing Anthropic login:
Use
ANTHROPIC_AUTH_TOKEN, not ANTHROPIC_API_KEY. Both work, but ANTHROPIC_API_KEY makes Claude Code prompt for approval of a custom key on first run, which fails outright in non-interactive use (claude -p, CI, scripts) with Not logged in · Please run /login. ANTHROPIC_AUTH_TOKEN skips that prompt and does not conflict with an existing claude.ai session.~/.claude/settings.json yourself for a setup that persists across terminals:
The ANTHROPIC_DEFAULT_* entries decide which Lyceum model each Claude tier resolves to, so picking Opus or Sonnet from the /model menu selects the model you mapped. API_TIMEOUT_MS is worth raising, since reasoning models can think for a while before the first token.
Prefer a one-line script that does the settings.json edit for you? Run:
VS Code extension
The Claude Code extension for VS Code reads its own environment block, not~/.claude/settings.json. Open Settings → Extensions → Claude Code, or edit settings.json directly:
claudeCode.disableLoginPrompt is what stops the extension asking you to sign in to claude.ai. Without it the login prompt keeps appearing even though the token is set, because the extension does not know the base URL points somewhere other than Anthropic.
Reload the window after saving. The same block works in the JetBrains plugin’s environment settings.
Switching models mid-session
Pass any Lyceum model ID directly to/model inside Claude Code:
z-ai-glm-5.2) are accepted for clients that reject / in model names.
Note: the bare /model menu (without an argument) only lists Anthropic tier names and selecting there switches between the tiers mapped below, not the full catalog.
Model mapping
Anthropic tier names map to Lyceum models automatically:
Model selection precedence, highest first:
- A Lyceum model ID in the request’s
modelfield (what/model <id>sends) - The tier mapping above
Switching from Anthropic to Lyceum
If you previously used Claude Code with a direct Anthropic key, make sure to update both variables - not just the base URL. Claude Code warns you if both a claude.ai session andANTHROPIC_API_KEY are set at the same time. To avoid auth conflicts, run /logout inside Claude Code before setting the Lyceum key, or use lyceum code, which runs in a separate profile.
Note on 1M context models
Avoid usingsonnet[1m] or similar extended-context variants. The [1m] suffix is Anthropic-specific and Claude Code will not connect through the proxy with it set. Use sonnet instead, either via /model in Claude Code or by setting "model": "sonnet" in ~/.claude/settings.json.

