ai newsDo., 15. Okt.
EilmeldungMeta and Apple team up to make Muse AI models run better on Macs

Claude Code mit offenen Modellen betreiben

Claude Code kommuniziert über die Anthropic Messages API mit seinem Modell und lässt sich per Umgebungsvariable ANTHROPIC_BASE_URL auf andere Endpunkte umleiten. So kann das Tool auch mit kompatiblen APIs und offenen Modellen genutzt werden.

dev.toMittwoch 01:16 · 14.10.DE2 Min. Lesezeit
Bild: dev.to

Disclosure: I'm a co-founder of ScaledThought, the API used below. Drafted with AI assistance.

Claude Code talks to its model through the Anthropic Messages API, and it lets you change where those requests go with ANTHROPIC_BASE_URL. Point it at an API that speaks the same protocol and Claude Code keeps its tools, permissions and workflow while a different model does the thinking.

This walkthrough points it at ScaledThought, an OpenAI- and Anthropic-compatible API for open-weight models. It's hosted in the US, and prompts and completions are never stored or logged (every response carries x-st-data-retention: none ). The Claude Code setup below was run on 2026-10-13 with Claude Code 2.1.296: reading, editing a file and running a shell command all worked.

Have an agent do it, or run the CLI yourself in your project's directory:

npx -y scaledthought@0.3 init --region us --source org-devto --email "you@example.com" Enter fullscreen mode Exit fullscreen mode It writes ST_API_KEY and ST_BASE_URL to./.env (mode 0600, added to.gitignore ) and never prints the key. Usage is prepaid: the CLI gives you a top-up link to approve (from $10, no subscription), and calls are paid from prepaid credits. You can give each key a daily budget, so a runaway session can't run up a bill.

Prefer a browser? Sign up at scaledthought.com/go/org-devto and create a key on the dashboard.

set -a;../.env; set +a # puts ST_API_KEY in the environment export ANTHROPIC_BASE_URL = https://api.us.scaledthought.com # no /v1: Claude Code adds /v1/messages export ANTHROPIC_AUTH_TOKEN = " $ST_API_KEY " export ANTHROPIC_MODEL = deepseek-v4-1-flash export ANTHROPIC_DEFAULT_HAIKU_MODEL = deepseek-v4-1-flash # Claude Code's small background tasks claude Enter fullscreen mode Exit fullscreen mode That's it. Ask it to read a file, edit code or run a command; its tools work through the API like any other request.

The full guide, including the MCP server for keys, budgets and billing inside Claude Code: scaledthought.com/guides/claude-code.

Not affiliated with or endorsed by Anthropic or any model publisher. Claude and Claude Code are trademarks of Anthropic; model names are trademarks of their owners.

Originaltitel: Run Claude Code on open-weight models, hosted in the USQuelle: dev.to (dev.to). Original öffnen