DEV Community

Tadly
Tadly

Posted on AI-assisted

Run Claude Code on an open model with three environment variables

Claude Code doesn't care which model answers it. It reads its endpoint from ANTHROPIC_BASE_URL, so any Anthropic-compatible API can sit behind it. That's useful when you hit the 5-hour limit, or when the job is routine (tests, small fixes, boilerplate) and doesn't need a frontier model.

Setup

export ANTHROPIC_BASE_URL=https://api.tadly.dev
export ANTHROPIC_AUTH_TOKEN=$TADLY_API_KEY
export ANTHROPIC_MODEL=qwen3.5
claude
Enter fullscreen mode Exit fullscreen mode

What changes: the model. The tool, your repo and your workflow stay the same.

What gets worse: hard multi-file reasoning. Keep a Claude model for that and switch back by unsetting the variables.

Things to check with any provider: context size (Qwen-3.5 has a 128K-token context here), whether tool calls work, and what the API returns when you hit a limit. An honest 429 with a reset time beats a hang.


Disclosure: I build Tadly, the endpoint in the example. The same three variables work with any Anthropic-compatible provider. There's a comparison of the options, with sources, here: Run Claude Code for less.

Top comments (0)