Claude Code Multi-Provider Setup Guide (GLM 5.2, MiniMax M3 and more)
Video summary
Companion notes
Store every provider's key in your shell profile, not in settings.json
The video walks through a multi-provider Claude Code setup that kills two problems at once: switching models without editing JSON, and stopping plaintext API keys from sitting in ~/.claude/settings.json where any user with read access to your home directory can grab them. You paste all keys into ~/.bashrc (run echo $SHELL first — it may actually be ~/.zshrc) at the bottom of the file, then add an export PATH line pointing at ~/.local/bin where your launcher scripts live.
Launcher script pattern (claude-minimax, claude-glm, …)
Each script does three things in order: require the matching env var and bail with a clear error if it is missing, export the provider-specific base URL and the three ANTHROPIC_MODEL_* overrides, then exec claude. Run claude-minimax to talk to MiniMax, claude-glm to swap to GLM. Inside Claude Code, /status will show the active base URL; the billing page is the more reliable check because it surfaces the exact model that handled inference.
Tier mapping for the Chinese providers
Claude Code only knows about opus, sonnet, and haiku internally, so you override each one to the provider's actual model. For GLM, opus and sonnet both point to GLM 5.2 (5.1 works for sonnet) and haiku falls back to GLM 4.7. LongCat only ships one model right now — LongCat 2.0 — so all three tiers point at it. Qwen uses Qwen 3.7 Max or Plus; Kimi uses K2.7 or K2.6. Customise the 200K-token autocompactWindow here too.
What stays in settings.json
Only shared config lives there now — theme, verbosity, and the creator's skip-dangerously-permission-mode-prompt: true flag. Wipe the old per-provider base-URL and key entries once the launchers work; your agent can do this for you.
Native IDEs beat Claude Code on price
The creator's final call: Zcode for GLM 5.2, Kimi Code for K2.6/K2.7, and Qwen Code are cheaper than routing through Claude Code if you buy the provider's coding plan. MiniMax is the only one without a native coding IDE. Stick with the launcher setup only if you specifically want the Claude harness on top of these endpoints — GLM 5.2 on Claude Code has been the strongest combo in his testing so far.
Watch on YouTube
Prefer the native player? Open it on YouTube: https://www.youtube.com/watch?v=gG6qY9fnb7w
