Who it is forA developer working on private code who needs to control which external providers see prompts.
The problemA router that can fail over across several upstreams may send code to providers you did not choose.
The outcomeOnly the upstream you name receives requests, and pasted API keys are replaced before leaving your machine.
What you need first
- npm, to install the package globally
- A terminal on Linux, macOS, or Windows
- A coding harness you already use, such as OpenCode or Claude Code
- Docker, only if you choose the container route
Steps
- Open
~/.bansos/config.jsonin a text editor. - Add a
securityblock with"mode": "strict","dlp": "redact", and"allowedUpstreams": ["zen"]. - Restart the daemon with
bansos stopand thenbansos start --bg. - Run
bansos doctorto confirm the daemon is in strict mode. - Run
bansos modelsand check that only models from the allowed upstream appear.
Prompt for your agent
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.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for ihsan-ramadhan/bansos-router and "Restrict requests to one approved upstream"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer