- This is a Bun, TypeScript, ESM OpenCode plugin that routes direct subagents to models based on the root primary session's model.
- Match exact
provider/modeland agent IDs. Preserve route order: later matching routes win. - If no route matches, leave model selection unchanged so OpenCode's normal agent configuration and model/variant inheritance apply.
- Nested subagents inherit the model selected for their parent subagent.
- Use Bun and follow the strict TypeScript and Biome configuration.
- Treat
src/schema.tsas authoritative; never editschema.jsondirectly. Runbun run generate-schemaafter schema changes. - Before finishing, run
bun run typecheck,bun run check, andbun run build. - For local testing, follow the README's Development section to load
src/index.tsdirectly in OpenCode. - Do not add tests yet; they are intentionally deferred while the pre-release API and configuration shape is established.