ClaudeMap

My Free Code

An open-source multi-provider AI gateway for Claude Code — model routing, fallbacks, and local models behind one endpoint.

SDKs & Toolinggatewayroutingmulti-providerlocal-modelsproxy

My Free Code is a self-hosted gateway that speaks the coding-agent protocol: point Claude Code (or Codex, Cline) at it and route requests across dozens of providers — OpenRouter, Groq, DeepSeek, Bedrock, plus local runtimes like Ollama and LM Studio — with ordered fallbacks, streaming SSE, tool calls, and reasoning pass-through. The pragmatic answer when you want Claude Code's workflow but not a single vendor's bill.

What it does

  • Ordered provider fallbacks (e.g. DeepSeek → Groq → Ollama) that never duplicate a turn mid-stream
  • Catalog spans dozens of hosted providers plus local runtimes (Ollama, LM Studio, llama.cpp)
  • Agent-grade protocol: streaming SSE, tool calls/results, images, reasoning pass-through with effort levels
  • Local Admin UI at /admin; MIT licensed, Python 3.10+

When to use it

Best for developers who want the Claude Code workflow on cheaper or local models — cap vendor spend, add privacy via local fallbacks, or keep coding through provider outages.

Getting started

git clone https://github.com/hkqr/my-free-code && cd my-free-code
python -m pip install -r requirements.txt
cp .env.example .env   # fill in provider keys
python -m my_free_code  # serves at http://127.0.0.1:8082

Things to know

You are swapping Anthropic's model for something else — coding quality tracks whatever you route to. Self-hosting means you maintain provider keys and updates; check each provider's ToS on proxying.

Repository

hkqr/my-free-code

Charted

Related on the map

  • E2B

    SDK / Tool

    Open-source secure sandboxes where AI agents run code — the de facto execution layer for agent apps.

    • sandbox
    • code-execution
    • sdk
    • agents
  • FastMCP

    SDK / Tool

    Pythonic framework for building MCP servers — decorators, type hints, and zero boilerplate.

    • framework
    • python
    • mcp
    • type-driven
  • Anthropic's official TypeScript SDK for building agentic applications.

    • official
    • sdk
    • typescript
    • anthropic