DEDUPED Hot AI repos. Real use cases. What people build. Get the Monday 5

How to run coding agents against local models with My Free Code

Point the gateway at Ollama, LM Studio, or llama.cpp so requests stay on your machine.

Short answer: Start your local model server, such as Ollama at http://127.0.0.1:11434/v1, LM Studio at http://127.0.0.1:1234/v1, or llama.cpp at http://127.0.0.1:8080/v1; then run cp .env.example .env and set OLLAMA_BASE_URL, LM_STUDIO_BASE_URL, or LLAMACPP_BASE_URL plus MODEL to the matching local model, such as ollama/llama3.1; run python -m my_free_code to start the gateway. All steps.

Who it is forA developer working offline or with code that cannot leave the machine, who already runs a local model server.

The problemCoding agents are usually wired to hosted APIs, which sends source code to outside providers.

The outcomeThe gateway forwards agent requests to a local model server at a local base URL, and the agent works without a hosted provider key.

What you need first

  • Python 3.11 or newer
  • A clone of the my-free-code repository
  • At least one provider API key for the MODEL values you choose, or a local model server such as Ollama, LM Studio, or llama.cpp
  • Claude Code or another supported client installed and on PATH

Steps

  1. Start your local model server, such as Ollama at http://127.0.0.1:11434/v1, LM Studio at http://127.0.0.1:1234/v1, or llama.cpp at http://127.0.0.1:8080/v1.
  2. Run cp .env.example .env and set OLLAMA_BASE_URL, LM_STUDIO_BASE_URL, or LLAMACPP_BASE_URL plus MODEL to the matching local model, such as ollama/llama3.1.
  3. Run python -m my_free_code to start the gateway.
  4. Run python -m my_free_code.cli.mfc claude or another launcher command from the README to connect your agent.
  5. Confirm the gateway log shows the request reaching your local server rather than a hosted provider.

Prompt for your agent

In the my-free-code repository, set OLLAMA_BASE_URL and MODEL=ollama/<model-name> in .env, start the gateway with python -m my_free_code, and send one test request. Expected output: a completed response generated by the local model. Verify that no hosted provider key is required for the request to succeed.

Caveat. The README says the gateway is intended for local use, so keep HOST set to 127.0.0.1 and do not expose the Admin endpoints to the Internet.

Use this in your AI agent

Ask your agent

Using the Deduped MCP, get the setup steps for hkqr/my-free-code and "Run coding agents against local models"

Add Deduped to Claude Code once

claude mcp add --transport http deduped https://dedupedai.com/mcp

Cursor, ChatGPT, others

Share: X LinkedIn Hacker News Email Copy link

Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer