If you have both a Claude Pro subscription and a ModelArk Coding Plan, you do not need separate Claude Code installations. Claude Code supports provider switching through environment variables, and the cleanest setup is a pair of PowerShell launcher functions that start Claude Code with the correct provider for each session — one command for Claude Pro, one for ModelArk.
This is the setup you want if any of these sound familiar:
- You want to use Claude Pro for difficult tasks and ModelArk for coding work
- You don’t want to edit environment variables every time you switch providers
- You want multiple Claude Code terminals running with different providers simultaneously
- You want to avoid accidentally using the wrong provider
Why provider switching matters
Claude Code decides which backend to use based on environment variables. When no provider variables are set, Claude Code uses your Claude.ai subscription. When ModelArk variables are present, it routes requests through ModelArk instead.
Without a switching workflow, it’s easy to leave ModelArk variables active and accidentally launch future sessions against the wrong backend. The safest approach is to isolate provider settings to the terminal session that launched Claude Code.
Step 1: Store your ModelArk API key
Open your PowerShell profile:
notepad $PROFILE
Add your API key:
$env:MODELARK_API_KEY="YOUR_MODELARK_API_KEY"
Save the file and reload your profile:
. $PROFILE
Verify it loaded:
$env:MODELARK_API_KEY
Expected output:
YOUR_MODELARK_API_KEY
Step 2: Create a provider cleanup function
Add this to your PowerShell profile:
function Clear-ClaudeProvider {
Remove-Item Env:ANTHROPIC_BASE_URL -ErrorAction SilentlyContinue
Remove-Item Env:ANTHROPIC_AUTH_TOKEN -ErrorAction SilentlyContinue
Remove-Item Env:ANTHROPIC_MODEL -ErrorAction SilentlyContinue
}
This prevents provider settings from leaking between sessions. Without it, one provider’s environment variables can affect future Claude Code launches in the same terminal.
Step 3: Create a Claude Pro launcher
Add to your PowerShell profile:
function cpro {
Clear-ClaudeProvider
claude @args
}
Usage:
cpro
Claude Code launches using your Claude Pro subscription and Claude.ai authentication.
Step 4: Create a ModelArk launcher
Add to your PowerShell profile:
function cark {
Clear-ClaudeProvider
$env:ANTHROPIC_BASE_URL = "https://ark.ap-southeast.bytepluses.com/api/coding"
$env:ANTHROPIC_AUTH_TOKEN = $env:MODELARK_API_KEY
$env:ANTHROPIC_MODEL = "ark-code-latest"
try {
claude @args
}
finally {
Clear-ClaudeProvider
}
}
Usage:
cark
Claude Code launches using ModelArk. When Claude Code exits, the finally block automatically removes the provider variables from the terminal session — so future launches from the same terminal default back to Claude Pro.
Step 5: Verify which provider is active
Inside Claude Code, run:
/status
For ModelArk sessions, look for:
Auth token: ANTHROPIC_AUTH_TOKEN
Anthropic base URL: https://ark.ap-southeast.bytepluses.com/api/coding
For Claude Pro sessions, those custom provider values should not appear. This is the fastest way to confirm which backend is active before starting work.
Step 6: Run both providers simultaneously
Each terminal maintains its own environment variables, so both sessions can run at the same time without interfering.
Open Terminal Window 1:
cd E:\Projects\YourProject
cpro
Open Terminal Window 2:
cd E:\Projects\YourProject
cark
A practical way to split the work: use Claude Pro for architecture design, cross-module debugging, planning, large refactoring strategies, and complex reasoning. Use ModelArk for implementation, boilerplate generation, documentation updates, routine fixes, and test generation. This preserves Claude Pro usage for high-value work while extending coding capacity through ModelArk.
Step 7: Verify MCP servers work across providers
User-level MCP servers work independently of the backend provider. Check your connected MCPs:
claude mcp list
Expected output:
notion: https://mcp.notion.com/mcp (HTTP) - ✔ Connected
plugin:claude-mem:mcp-search - ✔ Connected
These MCPs remain available in both Claude Pro and ModelArk sessions. Project-level MCPs such as Playwright also continue working regardless of provider.
FAQ
Can I run Claude Pro and ModelArk simultaneously? Yes — each terminal maintains its own environment variables, so multiple Claude Code sessions with different providers can run at the same time without interfering.
Will ModelArk variables affect my Claude Pro conversations after I switch back? No. The finally block in the cark function removes ModelArk settings when Claude Code exits. Launch cpro afterward and Claude Code resumes your Claude Pro conversations normally.
Can I switch models inside Claude Code when using ModelArk? Yes. The provider remains ModelArk, but available models depend on your ModelArk Coding Plan and which models you have enabled.
Do MCP servers work with both providers? Yes. User-level MCPs and project MCPs are independent of the provider backend and load correctly in both Claude Pro and ModelArk sessions.
Do I need two Claude Code installations? No. One Claude Code installation supports both Claude Pro and ModelArk through the launcher functions above.
Tested on: Windows 11 Pro, PowerShell 7, Claude Code 2.1.169, Claude Pro subscription, ModelArk Coding Plan Lite. Active troubleshooting time: approximately 60 minutes. Tools used: Claude Code, PowerShell, ModelArk API, MCP Manager, Notion MCP, Playwright MCP, Claude Mem MCP.