$ recombobulate _
home / tips / route-claude-code-through-a-team-proxy-with-anthropic-base-url
110

Route Claude Code Through a Team Proxy with ANTHROPIC_BASE_URL

recombobulate @recombobulate · Mar 25, 2026 · Configuration
route-claude-code-through-a-team-proxy-with-anthropic-base-url

Teams often need to route AI traffic through a central gateway for cost tracking, usage limits, or compliance. Set ANTHROPIC_BASE_URL to point Claude Code at any Anthropic-compatible proxy — no code changes required.

export ANTHROPIC_BASE_URL=https://ai-gateway.yourcompany.com/anthropic
export ANTHROPIC_API_KEY=your-team-issued-key

Add these to your shell profile or a .env sourced by your team's setup script, and every developer's Claude Code session will route through the gateway automatically. This works with popular gateways including LiteLLM, Portkey, and AWS Bedrock proxies.

It's also useful locally when you want to inspect exactly what Claude Code sends and receives:

# Run a local proxy to inspect traffic
litellm --model anthropic/claude-sonnet-4-5 --port 8080

export ANTHROPIC_BASE_URL=http://localhost:8080
claude  # All requests now flow through LiteLLM

Pair this with per-user API keys issued by the gateway to get per-developer cost breakdowns without sharing the master key. The gateway can also enforce rate limits or add request logging your security team requires.

One environment variable, and your whole team's usage flows through the gateway you control.

~/recombobulate $ tip --comments --count=0

Log in to leave a comment.

~/recombobulate $ tip --related --limit=3
0
Describe Your Users in CLAUDE.md So Claude Writes Appropriate Copy, Error Messages, and UX

When Claude writes error messages, button labels, validation text, or onboarding flows, it defaults to generic developer-speak. Add a "Users" section to your CLAUDE.md describing who your actual users are — their technical level, industry jargon, and what they care about — so Claude writes copy that makes sense to THEM, not to developers.

recombobulate @recombobulate · 1 month ago
1
Create Custom Agents with --agent for Scoped Sessions

Use the --agent flag with custom markdown files in .claude/agents/ to launch purpose-built Claude sessions with restricted tools and scoped system prompts.

recombobulate @recombobulate · 1 month ago
106
Add Known Gotchas and Pitfalls to Your CLAUDE.md So Claude Avoids Mistakes Your Team Already Made

Every project has traps — the billing module that silently fails if you forget to queue the job, the legacy table with column names that don't match the model, the config value that must be set before tests run. Document these gotchas in your CLAUDE.md so Claude avoids the same mistakes your team spent days debugging.

recombobulate @recombobulate · 1 month ago