hkqr/my-free-code · 02 Sep 2026 · Feature

After Fable, a Local Gateway Tries to Free Claude Code

Jordan Ellis
Jordan Ellis
Senior Editor

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

hkqr/my-free-code
634 stars Velocity · 7d +1.6 ★/day

The Lock-In Moment

hkqr/my-free-code

The trouble started when Anthropic took away Fable. At least, that is the story told by developers who had built their terminal workflow around Claude Code only to discover that model tiers can vanish overnight [9]. Claude Code has become the reference implementation for agentic coding: it edits across files, runs tests, and manages Git from a shell prompt. But it is also a closed loop. The client speaks Anthropic’s proprietary Messages API, bills against Anthropic’s keys, and offers no free tier for sustained use [6]. When access to a favored model tier disappears, the workflow does not pause gracefully—it breaks.

That fragility is why a small FastAPI project called my-free-code is circulating in the corners of the AI coding community. The name sounds like a learn-to-code nonprofit, but the intent reads more like a manifesto: free the code, and the coder, from single-provider dependency. It is a local gateway that sits between Claude Code (and a growing list of other agents) and the broader universe of large language model providers. At version 0.8 it is early, but it is already ambitious enough to map Anthropic’s wire protocol to more than forty upstream backends, from OpenRouter and Groq to a laptop-bound Ollama instance.

A Proxy, Not a Clone

The first thing to understand is what my-free-code does not do. It does not reimplement Claude Code, nor does it fork Anthropic’s model weights. It is an interception layer. The project exposes the Anthropic Messages API at /v1/messages, an OpenAI-compatible Responses endpoint at /v1/responses, and a handful of administrative routes on a local FastAPI server. Coding agents connect to 127.0.0.1:8082 instead of Anthropic’s cloud, and the gateway translates requests outward to whatever provider the user has configured.

The architecture is deliberately modular. Wire protocols, routing logic, and provider runtimes are separated into distinct layers, an arrangement that mirrors the concerns of enterprise reference architectures [2][5] but stripped down to run on a developer’s machine. At the top, a coding agent such as Claude Code, Codex, or Cline speaks Anthropic or OpenAI shaped JSON. The gateway’s model router decides where to send the request. A primary provider gets the first shot; if it fails before emitting output, an ordered fallback list takes over. Once a streaming response has begun, the gateway commits to that provider rather than silently switching mid-turn and duplicating the work. Behind the router, the provider runtime dispatches to common OpenAI-compatible endpoints, specialized adapters for unusual authentication schemes, or local runtimes such as Ollama, LM Studio, and llama.cpp.

The Agent-Specific Glue

What distinguishes my-free-code from a generic LLM proxy is that it is built for agents, not chatbots. Chat proxies shuffle text; coding agents invoke tools, stream reasoning tokens, and expect structured results. The gateway normalizes tool definitions, tool calls, and tool results across providers. It passes through reasoning and thinking metadata, and it supports a normalized reasoning policy—auto, on, off, with optional effort levels low, medium, high—that provider adapters map to their respective upstream fields.

One of the more subtle tricks is “stable public model identity.” Claude Code asks for a specific Anthropic tier: Fable, Opus, Sonnet, or Haiku. The gateway preserves that identity in the response even when the actual computation is routed to DeepSeek, Groq, or a local Llama 3.1 instance. The client remains none the wiser, which prevents the agent from rebelling against an unfamiliar model name. Ordered fallback, provider health backoff, per-provider concurrency limits, and rate-window control round out the operational features. These are the kinds of reliability mechanisms that enterprise AI gateways advertise for production clusters [12]; here they are tuned for a single developer’s terminal session.

The project also includes launcher adapters that wrap the proxy setup for specific clients. Rather than manually exporting environment variables before every session, a launcher prepares the local proxy environment and delegates arguments to the installed binary. Supported harnesses include Claude Code, OpenAI’s Codex, Cline, Hermes, DeepSeek Harness, Grok Build, and Muse Code. That list signals the project’s broader bet: the agent interface is becoming a category, and the backend should be interchangeable.

Forty Providers and the Kitchen Sink

The provider catalog is almost comically broad. It includes the usual suspects—OpenAI, Azure OpenAI, Google Vertex, Amazon Bedrock, Mistral, Cohere—and a long tail of specialized hosts such as Chutes, Featherless, ZenMux, Wafer, Kilo, LLM7, and Poolside, plus local options like Ollama and LM Studio. The README is admirably honest about the limits of that breadth: providers with unusual authentication or protocols require dedicated adapters, while the common OpenAI-compatible ones ride a shared transport.

That honesty matters because the project is entering a space already occupied by heavier infrastructure. AWS publishes a full reference architecture for multi-provider generative AI gateways that combines Amazon Bedrock, SageMaker, and LiteLLM for enterprise governance [2][5]. Truefoundry markets an open-source agent harness with sub-ten-millisecond latency, SSO, RBAC, and centralized audit logging [12]. my-free-code offers none of that enterprise scaffolding. It is local-first, runs on a single port, and its security section reads like a warning label: keep the host bound to localhost, set a non-trivial auth token, and never expose the admin panel to the internet.

Honest Limitations

At version 0.8, the project is still a personal tool. It does not track spend across providers, enforce team-wide rate limits, or integrate with corporate identity systems. The test suite covers routing, protocol conversion, authentication, reasoning, and streaming primitives, which suggests the core mechanics are solid, but the surface area is narrow. It is, in essence, well-organized glue code—an admission the README implicitly makes by describing the architecture as a stack of adapters and runtimes rather than a novel model or algorithm.

And yet, that glue addresses a real pain point. Enterprise gateways solve the problem of “how does a platform team govern two hundred engineers hitting five different model APIs.” my-free-code solves the problem of “how does one developer keep using Claude Code after losing access to a tier, or after the API bill crosses into absurdity.”

Outlook

The project sits at the intersection of two accelerating trends. First, agentic coding interfaces—terminal-first agents that edit, test, and commit—are consolidating around a small set of interaction patterns, even as the underlying models proliferate. Second, developers are increasingly unwilling to treat any single provider as the sole backend for their workflow. The Fable episode [9] was a reminder that model tiers are product decisions, not physical constants.

By treating Anthropic’s Messages API as a de facto wire standard rather than a vendor lock, my-free-code bets that the agent layer will outlast the provider layer. The risk, of course, is that Anthropic could change its client to resist such proxies, or that the maintenance burden of forty-plus provider adapters will overwhelm a solo or small-team project. The opportunity is a future where a developer’s coding agent is a stable, local fixture and the models behind it are as fungible as browser tabs.

Sources

  1. Learn to Code — For Free — Coding Courses for Busy People
  2. Streamline AI operations with the Multi-Provider Generative ...
  3. Claude Code Alternatives (2026): 11 Tested, 3 That Beat It for Under $20 ...
  4. Codecademy: Learn to Code - for Free
  5. Guidance for Multi-Provider Generative AI Gateway on AWS
  6. Claude Code Alternatives: Top AI Coding Tools - Replit
  7. freeCodeCamp - Apps on Google Play
  8. Building AI Agent With Multiple AI Model Providers Using ...
  9. Top alternatives to Claude Code (avoid vendor lock-in) - YouTube
  10. freeCodeCamp.org
  11. Understanding LLM Gateway in simple terms
  12. Best AI Gateway for Claude Code in 2026 - Truefoundry

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