Proposal: plugins/nadir, a decision-only routing plugin backed by Nadir's classifier
What
A built-in plugins/nadir that picks the model per request from Nadir's decision API.
A request naming nadir-auto is classified into simple / medium / complex by a call to /v1/bucket, and PreRequestHook rewrites provider and model to whatever that tier is configured to. A request naming any other model is passed through untouched, so it is opt-in per request rather than gateway-wide.
{
"name": "nadir",
"enabled": true,
"config": {
"tiers": {
"simple": "openai/gpt-4o-mini",
"medium": "openai/gpt-4o",
"complex": "anthropic/claude-sonnet-4-5"
},
"fallback_model": "openai/gpt-4o"
}
}How it differs from plugins/routing
The routing plugin already classifies complexity with keywords, embeddings, an LLM call, and session pinning. This does not touch any of that. It is a separate plugin whose classifier is a trained model served over an API, so the tradeoff is different from all three: no keyword list to maintain, no embedding model to host, no classifier model to pay for per request, at the cost of one network round trip per routed request.
To be straight about it: I have no measurement comparing it to the routing plugin's classifiers on your traffic, and I am not claiming one. If the comparison is what decides this, say which arm you would want it run against and I will run it and post the numbers.
Failure behavior
fallback_model is required config, validated at Init. A classification that errors, times out past timeout_ms (default 3000), or returns a bucket with no tier configured routes there and logs a warning on the routing engine log. PreRequestHook errors are non-blocking in Bifrost, so the plugin cannot fail a request.
Status
Implemented and tested against dev at 575964b: 12 tests, go vet clean, the server package builds with the plugin registered, and validate-schema-sync.sh adds no new findings (it reports the same 1 error / 24 warnings a pristine tree does). Also builds as a .so for the dynamic-plugin path, though -buildmode=plugin does not link on my macOS host, so that path is compiled but not linked here.
Happy to open the PR, close this, or rework it as something that lives inside plugins/routing instead, whichever you prefer. Asking first per the contributing guide.
Disclosure: I maintain Nadir, and this was written with AI assistance.
Source: maximhq/bifrost