Claude Code AI API Proxy switch

Short answer: yes—pair Opcode (a native Claude Code GUI) with a GUI-driven LLM gateway like LiteLLM + Open WebUI (both open-source). This lets you keep using Claude Code while switching the underlying API/provider from a Mac GUI.
What to use
Opcode — a macOS desktop GUI built specifically for Claude Code (sessions, agents, MCP, usage). It doesn’t switch providers by itself, but it’s the nicest Claude Code GUI to sit on top of your workflow. (GitHub)
LiteLLM (Proxy/Gateway) — open-source router that exposes an OpenAI/Anthropic-compatible endpoint and lets you map aliases to 100+ providers (Anthropic Console, AWS Bedrock, Vertex AI, OpenRouter, local models, etc.). (GitHub)
Open WebUI or LibreChat — open-source, self-hosted GUIs that plug into LiteLLM so you can select/swap models/providers from a web interface instead of editing config files. (GitHub)
Why this works with Claude Code
Claude Code respects Anthropic-style env vars (e.g., ANTHROPIC_API_KEY) and can be pointed at a custom Anthropic-compatible base URL—so you can route it through LiteLLM (or even Bedrock/Vertex in enterprise setups). (Claude Help Center)
Minimal setup (macOS)
Install Opcode for a nice Claude Code GUI. (GitHub)
Run LiteLLM proxy (Docker or
pip) and define routes inconfig.yaml(e.g., aliasanthropic/sonnet→ Anthropic Console, Bedrock, or Vertex). (GitHub)Add a GUI: run Open WebUI and connect it to LiteLLM; you can now switch the active model/provider from the browser. (docs.litellm.ai)
Point Claude Code at the gateway:
export ANTHROPIC_API_KEY=your_gateway_key export ANTHROPIC_BASE_URL=http://localhost:4000/v1 # LiteLLM’s Anthropic/OpenAI-compatible endpointClaude Code will use whatever provider/model the gateway maps to; change it in Open WebUI and you’ve “switched the API” without touching Claude Code. (Claude Code prioritizes
ANTHROPIC_API_KEYwhen present.) (Claude Help Center)
If you’d prefer a single app name to start with: Opcode for the Claude GUI, and Open WebUI + LiteLLM for the clickable provider switch. This combo is fully open-source and runs great on macOS.






