Prerequisites
- Claude Code installed (
npm install -g @anthropic-ai/claude-codeor via installer) - A ClearMaas API key starting with
sk-
Setup
Set two environment variables before launching Claude Code:/v1/messages itself, so the base URL must be the bare host �?no /v1 suffix.
Persistent configuration
Rather than exporting env vars each time, add them to your shell profile:settings.json under the env key:
.claude/settings.json�?project-scoped~/.claude/settings.json�?user-scoped
Choosing a model
By default Claude Code usesclaude-sonnet-4-7-latest. Override the model in settings.json:
anthropic/ prefix routes through ClearMaas’s Anthropic-compatible path. To use models from other providers (GPT, Grok, DeepSeek, etc.), Claude Code can route them via ClearMaas’s translation layer.
Model routing via ClearMaas
ClearMaas translates OpenAI-style requests to upstream providers. To use a non-Anthropic model with Claude Code:MCP and tool search
WhenANTHROPIC_BASE_URL points to a non-Anthropic host, Claude Code disables MCP tool search by default. If your proxy forwards tool_reference blocks correctly, re-enable it: