switchboard
Reviewed
at commit 55a5cf9
New version, not yet reviewed
Sends data to OpenAI Decisions API (api.openai.com) or TypeSafe Jev (api.typesafe.ai, or ai-gateway.vercel.sh), only when you pick a picker and set a key
Picks Haiku, Sonnet or Opus for each subagent before it starts, with Jev or simple rules. One line per spawn above the prompt; /route shows each pick and what…
0 upvotes
Log in to upvote or save- Made by
- Hamza Zafar
- Pinned commit
-
55a5cf91eaf4a32d58890924c43c3e3044fb4d52 - What we checked
-
Chooses a Claude model (Haiku, Sonnet, Opus or Fable) for each subagent that names none, and shows one line per spawn plus a /route pane with each pick and its estimated cost. The picker is off by default; when you switch it on and give a key, only the subagent's type and short label are sent to OpenAI or TypeSafe, never its task text.
Review details
Static review of the source at the pinned commit; not run. Full review of the whole plugin at the new commit (the diff against adf9d72 was too large for a delta). Registers session.start (registers /route, starts a 5 s redraw timer), agent.spawn (skips forks and teammates; keeps a model the caller named when respectNamed is on; otherwise asks the picker and, in auto mode with confidence of at least 0.5, replaces the spawn's model with the pick; suggest mode only shows it), turn.complete (adds subagent token usage and computes API-price estimates), command.run for route, and ui.render for AbovePrompt and a Pane with Clear and Close buttons. Network: $.http.fetch POST with a Bearer key to https://api.openai.com/v1/decisions, https://api.typesafe.ai/v1/systemone or https://ai-gateway.vercel.sh/v1/evaluate depending on settings; body holds the ladder descriptions plus agent_type and description only; 4 s timeout, failures keep the original model. Keys come from the plugin settings or env OPENAI_API_KEY, TYPESAFE_API_KEY, AI_GATEWAY_API_KEY, and a key alone never enables a picker. Reads <CLAUDE_CONFIG_DIR or ~/.claude>/claude-code-mods/bands.json (band order, parsed as JSON, failures ignored) via $.fs.read. Stores routes in plugin state only. Runs no programs and writes no files. In auto mode it can change which model a subagent runs on, which can change cost; that is the announced purpose. npm dependencies: none.
- What it uses
-
- Reads your prompts: no
- Sees tool calls: no
- Blocks or changes tool calls: yes
- Reads or writes files: yes
- Runs programs on your machine: no
- Calls the model (uses tokens): no
- Sends data over the network: yes
- Stores data: yes
- Shows something on screen: yes
- Hooked events
Picks Haiku, Sonnet or Opus for each subagent before it starts, with Jev or simple rules. One line per spawn above the prompt; /route shows each pick and what it cost.
Made this mod? Add a badge to your README
Paste this into your README. The badge says reviewed once the current version has been reviewed, and links readers to this page.
[](https://modsforclaude.com/mods/switchboard/)