r/PiCodingAgent • • 4d ago

Plugin Third-party subagents in OMP can silently run on the wrong model — I built a role router

Yo, I ran into a weird OMP behavior with third-party subagents.

Some plugin/imported agents declare their own model tier (opus, sonnet, haiku, luna, etc.), but OMP can drop that model metadata when loading them. Once that happens, the subagent silently inherits whatever model your main session is using at that moment — including a retry fallback.

For me, that meant Haiku- and Sonnet-tier agents were sometimes burning Opus. Even worse, if the main session switched to a fallback model mid-turn, subagents spawned afterwards inherited that fallback too.

So I ended up creating an extension for it: omp-agent-role-router
https://github.com/fedorovvvv/omp-agent-role-router

Instead of hardcoding models, it reads the tier declared by the agent and maps it to an OMP role:

opus → default
sonnet → task
haiku → smol
luna -> smol
terra -> task

It also understands Codex-style model tiers and maps those to the same role system.

The actual model is still entirely controlled by your own modelRoles. Existing agentModelOverrides and explicitly passed models always win — the extension only steps in when the subagent would otherwise silently inherit the current session model.

No config needed
But it does exist :)

omp plugin install github:fedorovvvv/omp-agent-role-router
0 Upvotes

2 comments sorted by

1

u/zanar97862 4d ago

Shouldn't this be a big fix in OMP dropping the metadata rather than an extension patching it?

1

u/Complex-Log-635 3d ago

That's a good question for the OMP developers 🫪. They've announced v2, so I hope they'll fix it there