>
MicroGlow Relay

Claude Code with third-party models

Claude Code talks to an Anthropic-compatible endpoint. If you run a local gateway that speaks the same protocol, you can point Claude Code at it and choose the upstream behind it.

How the client is configured

Claude Code reads ~/.claude/settings.json. Two fields matter:

These are the client's own configuration fields. Your use of any model provider remains subject to that provider's terms.

With Relay

  1. Install and start Relay. It listens on 127.0.0.1:4141.
  2. In Relay, add a provider and one or more models on the Models page.
  3. On the Clients / Setup page, enable Claude Code. Relay writes ANTHROPIC_BASE_URL and the local token into settings.json, keeping a backup and detecting changes made outside Relay.
  4. Restart Claude Code. Quit Relay from the tray when you are done so the configuration is restored.

The same switch also handles Codex, which uses ~/.codex/config.toml and OpenAI Responses. Both clients can be pointed at Relay at the same time.

Download Relay User guide

Doing it by hand

If you prefer not to run a gateway, you can edit settings.json yourself and point ANTHROPIC_BASE_URL directly at a provider that offers an Anthropic-compatible endpoint. You are responsible for checking that the provider supports the Messages API, tool use and the features you rely on.

Relay is an independent project, not affiliated with Anthropic. "Claude Code" is used only to describe client compatibility.