whereismyai
OpenCode Subagent Router
OpenCode Subagent Router is an OpenCode plugin that intelligently routes subagent tasks to cheaper models and steps up on past failures.
OpenCode Subagent Router is an OpenCode V2 plugin that adaptively routes subagent tasks to faster and cheaper models while keeping hard work on the parent model. It builds a capability-labeled downgrade ladder from enabled OpenCode models and writes it via the session.instructions API. If the parent model omits a model, a stateless fallback evaluator runs on the cheapest rung. The plugin records routing decisions and outcomes in a local SQLite database and embeds prompts locally in TypeScript when vector escalation is enabled. It requires OpenCode V2 and Node.js 20 or newer, and needs no separate API key or external classifier service.
OpenCode Subagent Router at a glance
Key features
- Builds capability-labeled downgrade ladders
- Evaluates requests via stateless fallback
- Records routing decisions in local SQLite
- Embeds prompts locally in pure TypeScript
- Escapes tasks up a rung on past failures
- Loads model weights asynchronously in the background
- Verifies downloads with immutable SHA-256 digests
Use it for
- Routing simple grep searches to cheaper models
- Keeping frontier models on complex parent tasks
- Escaping failing tasks to stronger rungs automatically
- Tracking subagent outcomes in local SQLite history
Companions
Tools that articles about OpenCode Subagent Router recommend using with it, each with its job.
- OpenCode — Built to work with OpenCode.
- Context7 — Provides up-to-date documentation for AI agents and code editors.
- Ollama — Run local models at zero marginal cost, with code kept on your machine.
- Daytona — Runs sessions in isolated sandboxes synced to git branches.
- Composio — Equips AI agents with tools, managed user auth, and sandboxes across 1,500+ apps
- Oh My OpenCode Slim — Lightweight multi-agent orchestration and background tasks.
Alternatives to OpenCode Subagent Router
- OpenRouter — Access over 500 models and 80 providers through one unified API.
- Claude Code Router — It centralizes control of AI agent requests with intelligent routing and observability.
- OpenAgentsControl — Generates code matching your patterns and requires approval before execution.
- Orca — Runs multiple AI coding agents simultaneously in isolated workspaces.
- GoRoute — Consumes 5.1MB of RAM with sub-10ms latency for coding agents.
- Grok Build — Runs parallel subagents in git worktrees directly from your terminal
- OpenSandbox — Provides isolated environments with multi-language SDKs and lifecycle management.
- OrcaRouter — Route requests to the best models without paying token markups.
- OpenComputer — Runs tasks 3.3x faster than Devin with open-source infrastructure.
- Open Agents Template — Spawn autonomous coding agents with full sandboxes and durable workflows.
- HarnessRouter — One API to manage agent runtimes, sandboxes, and execution lifecycles.
- openRocode — Turns robot control into 3D computer use with safe execution and traceable runs.
All OpenCode Subagent Router alternatives