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

  • Harness Bridge

    SDK / Tool

    A local launcher that points Claude Code and seven other coding harnesses at any OpenAI-, Anthropic- or Responses-compatible endpoint — without editing a single config file.

    • launcher
    • local-models
    • cli
    • menu-bar
  • Claude for Siri

    SDK / Tool

    Answers macOS Spotlight and Siri prompts with your signed-in Claude Code account — an experimental macOS 27 model-delegation provider.

    • macos
    • siri
    • spotlight
    • model-delegation
  • Extract your own local chat history from ten AI coding assistants into one normalized JSONL — for fine-tuning, analytics, or backing up years of conversations. Standard library only.

    • cli
    • data-export
    • jsonl
    • backup