{
 "schema_version": 1,
 "generated": "2026-10-26",
 "id": "ihsan-ramadhan-bansos-router--lock-model-traffic-to-one-upstream",
 "repo": "ihsan-ramadhan/bansos-router",
 "repo_url": "https://github.com/ihsan-ramadhan/bansos-router",
 "repo_slug": "ihsan-ramadhan-bansos-router",
 "title": "Restrict requests to one approved upstream",
 "page_title": "How to restrict requests to one approved upstream with Bansos Router",
 "summary": "Turn on strict mode so only listed upstreams receive requests and pasted credentials are redacted.",
 "who": "A developer working on private code who needs to control which external providers see prompts.",
 "problem": "A router that can fail over across several upstreams may send code to providers you did not choose.",
 "outcome": "Only the upstream you name receives requests, and pasted API keys are replaced before leaving your machine.",
 "steps": [
  "Open `~/.bansos/config.json` in a text editor.",
  "Add a `security` block with `\"mode\": \"strict\"`, `\"dlp\": \"redact\"`, and `\"allowedUpstreams\": [\"zen\"]`.",
  "Restart the daemon with `bansos stop` and then `bansos start --bg`.",
  "Run `bansos doctor` to confirm the daemon is in strict mode.",
  "Run `bansos models` and check that only models from the allowed upstream appear."
 ],
 "agent_prompt": "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.",
 "agents": [
  "any"
 ],
 "difficulty": "Intermediate",
 "time": "15 minutes",
 "basis": "readme",
 "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.",
 "category": "Software and DevOps",
 "tags": [
  "Software and DevOps"
 ],
 "lang": "typescript",
 "requirements": [
  "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"
 ],
 "risk": "none",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [],
 "best": false,
 "score": 0.7,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/ihsan-ramadhan-bansos-router/lock-model-traffic-to-one-upstream/",
 "md": "https://dedupedai.com/use-cases/ihsan-ramadhan-bansos-router/lock-model-traffic-to-one-upstream/index.md",
 "disclaimer": "Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked \"Seen in the wild\", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email hello@dedupedai.com and we will look at it promptly.",
 "api": "https://dedupedai.com/api/v1/usecases/ihsan-ramadhan-bansos-router--lock-model-traffic-to-one-upstream.json",
 "api_version": "v1"
}
