Gatewarden Nexus
Docs
Plugins
What's new
Roadmap
Tools
Your Nexus
Plugins/nexus-routing-guard

OpenCode Plugin

nexus-routing-guard

v1.0.0Published

Detects model routing divergence between Nexus-configured agents and the running OpenCode instance's effective provider/model catalog.

Overview

Nexus writes agent-to-provider/model routing into a project's opencode.json, which can silently diverge from what the running OpenCode instance can actually serve; its merged provider catalog is knowledge only the running process has. This plugin compares, once per session, the effective agent routing against the effective provider catalog read directly from the running server via PluginInput.client. Detects two divergence classes: unknown_provider (the agent's provider is not in the instance's catalog at all) and unknown_model (the provider is valid, but the specific model id is not). Silent when clean; a banner only ever fires when something is actually broken.

Registered Hooks

Events this plugin listens to in the OpenCode runtime.

experimental.chat.system.transform

Best-effort reliable delivery of a divergence warning into the agent's context.

tool.execute.after

One-shot deterministic banner injection on the session's first tool call: the guaranteed backstop for the system-prompt mechanism above.

Technical Details

DistributionTypeScript source via nexus pull into .opencode/plugins/, no npm install required.
RequiresNothing beyond PluginInput.client; no Nexus MCP session required.
ConfigurationNEXUS_ROUTING_GUARD_ENABLED env var (default true) disables the check entirely, with zero API calls, when set to false.
Hard constraintsSilent when clean, one-shot per session, never blocks or slows session start; any API failure is caught and treated as no warning.

Plugin Info

Version
v1.0.0
Hooks
2
Custom Tools
0
Plans
All

Source Code

View the full source, report issues, or contribute on GitHub.

View repository

Links

  • All plugins
  • Plugin collection repo
  • Nexus CLI (nexusctl)
  • Pricing
  • Developer docs
Back to pluginsView on GitHub

Get started

Ready to put specifications first?
Start building with Nexus.

Governed specs drive your agents. No ad-hoc prompts, no vibe coding.

Sign in with GitHub
Gatewarden Nexus

Platform

  • Documentation
  • Tools
  • What's new
  • Roadmap
  • Pricing

Resources

  • MCP Server
  • CLI
  • GitHub

Company

  • RelicFrog
  • Imprint

Legal

  • Privacy policy
  • Terms of service
© 2026 RelicFrog Holding UG (haftungsbeschränkt)·v0.17.2 (aea217e)
a Gatewarden product by RelicFrog Holding UG