← all repositories
hkqr/my-free-code

Claude Code thinks it's talking to Claude. It's actually DeepSeek.

It exists because coding agents are hardcoded to Anthropic or OpenAI endpoints, and someone needed a local middleman to swap in cheaper or local models without the agent noticing.

Feature · 02 Sep 2026
After Fable, a Local Gateway Tries to Free Claude Code

My Free Code is a personal, open-source proxy that lets coding agents speak Anthropic’s protocol while routing to forty other model providers.

Read the in-depth article
my-free-code
Velocity · 7d
+1.6
★ / day
collecting data…
star history

What it does

my-free-code is a local FastAPI gateway that intercepts API calls from coding agents—Claude Code, Codex, Cline, and others—and reroutes them to a catalog of roughly 40 LLM providers. It speaks Anthropic Messages and OpenAI Responses on the front end, then translates and proxies to backends ranging from OpenRouter and Groq to Ollama and LM Studio.

The interesting bit

The gateway preserves a “stable public model identity,” meaning Claude Code can believe it is chatting with Sonnet while the actual work is handled by DeepSeek, Llama, or a local model. Once a streaming response begins, the fallback chain freezes—no silent mid-conversation provider swaps.

Key highlights

  • Broad provider catalog with Claude-tier routing (Fable, Opus, Sonnet, Haiku) and ordered fallbacks
  • Normalized reasoning controls (auto/on/off with effort levels) mapped to provider-specific fields
  • Launcher wrappers for nine agents including Claude Code, Codex, Grok Build, and Muse Code
  • Local admin UI and authenticated JSON endpoints for status and provider monitoring
  • Per-provider concurrency limits, rate-window control, and health backoff

Caveats

  • Explicitly built for local use; the README warns against exposing the admin or proxy to the internet
  • Launcher adapters require the target client to already be installed and available on PATH

Verdict

Worth a look if you want to run Claude Code against cheaper or local models without rewriting environment variables by hand. Skip it if you need a production-grade, publicly hosted API gateway.

Frequently asked

What is hkqr/my-free-code?
It exists because coding agents are hardcoded to Anthropic or OpenAI endpoints, and someone needed a local middleman to swap in cheaper or local models without the agent noticing.
Is my-free-code open source?
Yes — hkqr/my-free-code is open source, released under the MIT license.
What language is my-free-code written in?
hkqr/my-free-code is primarily written in Python.
How popular is my-free-code?
hkqr/my-free-code has 634 stars on GitHub.
Where can I find my-free-code?
hkqr/my-free-code is on GitHub at https://github.com/hkqr/my-free-code.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.