Skip to main content

zero-bill-router

Cut your coding-agent API bill to $0 with automatic free-tier failover and local Ollama routing.

Python License: MIT API Slop Score

Routing Architecture

zero-bill-router is a local OpenAI-compatible proxy server for coding assistants (Cursor, Cline, Claude Code, Codex, Gemini CLI). It transparently dispatches requests between local Ollama instances and free-tier cloud providers (Groq, OpenRouter Free, Google AI Studio) with automatic rate-limit failover.


Quick Start

Option A: CLI Installation

git clone https://github.com/an1zy/zero-bill-router.git
cd zero-bill-router
pip install -e .

# Initialize config, check provider connectivity, and start daemon
zero-bill init
zero-bill check
zero-bill serve

Option B: Agent Skill Installation

Install into your agent runtime:

npx skills add an1zy/zero-bill-router

Connect Your Coding Agent

Configure your coding assistant to use http://127.0.0.1:8787/v1 with model zero-bill-auto:

Cursor

  • Settings -> Models -> OpenAI API Key
  • Override Base URL: http://127.0.0.1:8787/v1
  • API Key: zero-bill
  • Model: zero-bill-auto

Cline

  • Settings -> API Provider: OpenAI Compatible
  • Base URL: http://127.0.0.1:8787/v1
  • API Key: zero-bill
  • Model ID: zero-bill-auto

Claude Code / Environment

export OPENAI_BASE_URL="http://127.0.0.1:8787/v1"
export OPENAI_API_KEY="zero-bill"

CLI Diagnostics

Provider Health Check

zero-bill check

Provider Health Check

Usage & Savings Report

zero-bill stats

Usage and Savings Report


How Routing & Failover Work

  1. Local Evaluation:
    • local_keywords: Prompts containing routine terms (commit message, summarize, rename, format, typo, docstring) route to local Ollama.
    • local_max_chars: Requests under 1,200 characters route locally to conserve cloud quotas.
  2. Cloud Cascading:
    • Complex tasks dispatch to free-tier cloud providers sorted by priority (Groq -> OpenRouter -> Gemini).
  3. Rate-Limit Failover:
    • On HTTP 429, 5xx, or timeout, the router flags the provider in cooldown (default: 60s) and fails over to the next candidate.
  4. Response Metadata:
    • Non-streaming responses include the header X-ZeroBill-Provider showing which target handled the request.

License

MIT. See LICENSE.

Metadata

Release files for zero-bill-router 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for zero-bill-router 0.1.0
File Size Uploaded Provenance Actions
zero_bill_router-0.1.0.tar.gz 17.4 kB With provenance Details for zero_bill_router-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for zero-bill-router 0.1.0
File Interpreter ABI Platform Actions
zero_bill_router-0.1.0-py3-none-any.whl Python 3 none any Details for zero_bill_router-0.1.0-py3-none-any.whl

Total release size: 33.9 kB

Release files / zero_bill_router-0.1.0.tar.gz

Download URL zero_bill_router-0.1.0.tar.gz
Size 17.4 kB
Tags Source
SHA-256 checksum
How to use checksums
31a076ec1fd5c585bbf6e5aa55b9b316d5b40a5e88551384d48f6701085c5abe
BLAKE2b-256 checksum
How to use checksums
daa88f4ea17246927f106a46c5c8375fe08249b2a1aa56cbd4c85e7338d423d0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 21, 2026.

Transparency log

Release files / zero_bill_router-0.1.0-py3-none-any.whl

Download URL zero_bill_router-0.1.0-py3-none-any.whl
Size 16.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c6f396b32b4026a3357557e485863de7917d47e3f50431afe901e05d96d1b541
BLAKE2b-256 checksum
How to use checksums
84447afc75eeaa300092c397960739395717f78e56d48c10cb4efead4881a57e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 21, 2026.

Transparency log

Security for zero-bill-router 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for zero_bill_router-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 21, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page