Run Qwen 4 Max inside Claude Code via OpenRouter (~/.zshrc setup) A developer published a shell configuration that routes Claude Code through OpenRouter to run Qwen 4 Max as the backing model, using a subshell function in ~/.zshrc so the override applies only to that session. The setup sets ANTHROPIC_BASE_URL to OpenRouter's API, points all model variables at qwen/qwen4-max, and enables the /effort reasoning switch while leaving plain `claude` on its normal configuration. | | Run Qwen 4 Max inside Claude Code via OpenRouter | | | From the video "Qwen 4 Max: I made it edit my video setup + honest take " | | | | | | 1. Create an OpenRouter API key openrouter.ai → Workspaces → Keys → New key; set a credit limit | | | 2. Paste this at the end of ~/.zshrc macOS and put your key in | | | 3. Run: source ~/.zshrc | | | 4. Start it with: claude-qwen plain claude stays on your normal setup | | | Use /effort to switch reasoning: low → low, medium/high → high, xhigh/max → extra high | | | claude-qwen = subshell: these vars only apply to this run | | | export ANTHROPIC BASE URL="https://openrouter.ai/api" | | | export ANTHROPIC AUTH TOKEN="