# AI use cases for Bansos Router (ihsan-ramadhan/bansos-router)

Repo: [ihsan-ramadhan/bansos-router](https://github.com/ihsan-ramadhan/bansos-router) | Use cases: 4 | Page: https://dedupedai.com/use-cases/ihsan-ramadhan-bansos-router/

bansos-router is a local daemon that routes free, keyless coding models from several upstreams to coding harnesses through one endpoint on 127.0.0.1:17070.

This file holds every use case of this repo. Each one starts with a "## " heading and ends with its URL.

- Run OpenCode on free keyless coding models: https://dedupedai.com/use-cases/ihsan-ramadhan-bansos-router/run-opencode-on-free-models/
- Use free models in Claude Code without API keys: https://dedupedai.com/use-cases/ihsan-ramadhan-bansos-router/use-free-models-in-claude-code/
- Host the free model router in a Docker container: https://dedupedai.com/use-cases/ihsan-ramadhan-bansos-router/share-free-model-endpoint-with-docker/
- Restrict requests to one approved upstream: https://dedupedai.com/use-cases/ihsan-ramadhan-bansos-router/lock-model-traffic-to-one-upstream/

## How to run OpenCode on free keyless coding models with Bansos Router

Repo: [ihsan-ramadhan/bansos-router](https://github.com/ihsan-ramadhan/bansos-router) | Difficulty: Intermediate | Time: 15 minutes | Basis: From the README

Point OpenCode at a local daemon that serves free coding models with no account or API key.

**Who it is for:** A developer who wants to try AI coding help in OpenCode without creating accounts or paying for keys.

**The problem:** Most coding harnesses need a provider account and an API key before they can run any model.

**The outcome:** OpenCode runs against free models served through the local Bansos Router endpoint.

### Steps

1. Install the package with `npm i -g bansos-router`.
2. Start the background daemon with `bansos start --bg`.
3. Configure OpenCode with `bansos setup opencode`.
4. Check the model list with `bansos models`.
5. Open OpenCode and choose one of the listed models.

### Prompt to paste into your agent

```text
Using the bansos-router repo, install the CLI, run `bansos start --bg`, then run `bansos setup opencode` for <project path>. Expected output: a configured OpenCode setup and a non-empty list from `bansos models`. Verify by running `bansos doctor` and confirming it reports the daemon as reachable.
```

### Caveat

The free model list changes as upstreams rotate their free tiers, so a model you picked may stop being offered later.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/ihsan-ramadhan-bansos-router/run-opencode-on-free-models/

## How to use free models in Claude Code without API keys with Bansos Router

Repo: [ihsan-ramadhan/bansos-router](https://github.com/ihsan-ramadhan/bansos-router) | Difficulty: Intermediate | Time: 15 minutes | Basis: From the README

Route Claude Code's Haiku, Sonnet, and Opus tiers to free models through the local daemon.

**Who it is for:** A Claude Code user who has no Anthropic key and wants to keep working on a coding project at no cost.

**The problem:** Claude Code expects a paid model provider, which blocks users who only want to experiment or work on small tasks.

**The outcome:** Claude Code sends its requests to free models through Bansos Router, with tiers mapped automatically.

### Steps

1. Install the package with `npm i -g bansos-router`.
2. Start the background daemon with `bansos start --bg`.
3. Configure Claude Code with `bansos setup claude-code`. (inferred, check the README)
4. Run `bansos ping` to see which models respond from your machine.
5. Start Claude Code in your project folder and send a small test prompt.

### Prompt to paste into your agent

```text
In the bansos-router repo, install the CLI, start the daemon with `bansos start --bg`, and run `bansos setup claude-code` for <project path>. Expected output: a Claude Code configuration that maps Haiku, Sonnet, and Opus tiers to free models. Verify by running `bansos ping` and confirming at least one model reports a live response.
```

### Caveat

The README says it checks from a GitHub datacenter, so run `bansos ping` on your own machine to see what you can actually reach.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/ihsan-ramadhan-bansos-router/use-free-models-in-claude-code/

## How to host the free model router in a Docker container with Bansos Router

Repo: [ihsan-ramadhan/bansos-router](https://github.com/ihsan-ramadhan/bansos-router) | Difficulty: Advanced | Time: 30 minutes | Basis: From the README

Run the daemon in a container with a persistent data volume and a built-in healthcheck.

**Who it is for:** A developer or small team who wants one always-running router instead of a global npm install on each machine.

**The problem:** Installing and keeping the daemon running on every machine is tedious, and state can be lost when a process restarts.

**The outcome:** The daemon runs in a container with state kept in a named volume, and harnesses point at the same endpoint.

### Steps

1. Clone the Bansos Router repository and change into its folder. (inferred, check the README)
2. Build the image with `docker build -t bansos-router .`.
3. Start the container with `docker run -d --name bansos -p 17070:17070 -v bansos-data:/home/node/.bansos bansos-router`.
4. Check the container logs with `docker compose logs -f` if you used compose, or read the container output otherwise.
5. Point your harnesses at `http://127.0.0.1:17070`.

### Prompt to paste into your agent

```text
Using the bansos-router repo, build the image with `docker build -t bansos-router .` and run it with the volume and port from the README. Expected output: a running container named bansos. Verify by opening `http://127.0.0.1:17070/healthz` and confirming the healthcheck responds.
```

### Caveat

Inside the container the daemon binds to 0.0.0.0, so publish the port only on a network you trust.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/ihsan-ramadhan-bansos-router/share-free-model-endpoint-with-docker/

## How to restrict requests to one approved upstream with Bansos Router

Repo: [ihsan-ramadhan/bansos-router](https://github.com/ihsan-ramadhan/bansos-router) | Difficulty: Intermediate | Time: 15 minutes | Basis: From the README

Turn on strict mode so only listed upstreams receive requests and pasted credentials are redacted.

**Who it is for:** A developer working on private code who needs to control which external providers see prompts.

**The problem:** A router that can fail over across several upstreams may send code to providers you did not choose.

**The outcome:** Only the upstream you name receives requests, and pasted API keys are replaced before leaving your machine.

### Steps

1. Open `~/.bansos/config.json` in a text editor.
2. Add a `security` block with `"mode": "strict"`, `"dlp": "redact"`, and `"allowedUpstreams": ["zen"]`.
3. Restart the daemon with `bansos stop` and then `bansos start --bg`.
4. Run `bansos doctor` to confirm the daemon is in strict mode.
5. Run `bansos models` and check that only models from the allowed upstream appear.

### Prompt to paste into your agent

```text
In the bansos-router repo, add the strict security block to ~/.bansos/config.json with allowedUpstreams set to <upstream name>, then restart with `bansos stop` and `bansos start --bg`. Expected output: `bansos models` lists only models from that upstream. Verify with `bansos doctor` that strict mode is reported.
```

### Caveat

Strict mode is opt-in and the README says the DLP redaction applies only to external upstreams, so review the config before you rely on it for sensitive code.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/ihsan-ramadhan-bansos-router/lock-model-traffic-to-one-upstream/
