How to set Claude Code's base URL for a relay and verify the relay really serves Claude
The article explains how Claude Code uses the ANTHROPIC_BASE_URL variable to redirect API traffic through a proxy, and how ANTHROPIC_AUTH_TOKEN and ANTHROPIC_API_KEY set the credential header. It notes that some providers route Claude Code to non-Claude models via the same mechanism, which Anthropic does not support through gateways. To check a relay, the author recommends behavioral tests rather than asking the model its identity, such as a Python tool called claude-relay-check that tests response format, prompt caching, and thinking-block signatures. A second tool, ModelTrace, estimates the model family from generated digit distributions but is described as only a hint. The piece is written by the operator of a relay, which the author discloses.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in