feat(evals): run the rubric judge through OpenRouter
why
--harness mastra already runs on an OpenRouter key alone, because Mastra's model router resolves openrouter/<vendor>/<model> ids. The judge can't. It only reads OpenAI, Anthropic and Google keys, so an OpenRouter-only setup still needs a Google key for the default judge. This lets the judge use the OpenRouter key too.
what changed
- An
openrouter/<vendor>/<model>judge (EVAL_VERIFIER_MODELorverifier.modelin config) runs on the evaluator's OpenAI client pointed athttps://openrouter.ai/api/v1, withOPENROUTER_API_KEY.resolveOpenRouterVerifierinverifierModel.tsdoes the mapping. A missing key throws, as an explicit judge with a missing key already does. evals doctorknowsOPENROUTER_API_KEY, for the judge and for harness rows whose model starts withopenrouter/. With--probeit validates the key (GET /key) and reports a judge model OpenRouter doesn't serve as retired (GET /models/<id>/endpointsreturns 404).- README: two sentences on choosing the judge.
The default judge stays google/gemini-3.5-flash. Nothing changes unless a model id starts with openrouter/.
One thing I have not checked: whether a judge reached through OpenRouter grades the same as that model on its vendor's own API. It's the same model id, but a different endpoint.
test plan
-
pnpm checkand the evals unit tests (1223 passing) - new
verifierModel.test.ts, and a doctor test covering an OpenRouter judge with a missing key, a served model, a rejected key and a retired model - live
evals doctor --harness mastra --probewithEVAL_VERIFIER_MODEL=openrouter/google/gemini-3.5-flash: key found, probe 200. With a made-up model: "model not found" - live run of one HardBench task,
--harness mastra -m openrouter/openai/gpt-6.1-solwith judgeopenrouter/google/gemini-3.5-flashand only OpenRouter and Browserbase keys in.env: graded, 0/2 criteria unverifiable - the same judge route on an October commit of this repo graded 720 of 724 HardBench runs for us. The other 4 came back as verifier uncertainty results. None failed on transport or auth
🤖 Generated with Claude Code
Summary by cubic
Allows the rubric judge to run through OpenRouter via openrouter/<vendor>/<model> ids, so an OpenRouter-only setup no longer needs a key from the judge's own vendor.
- The judge runs on the evaluator's OpenAI client pointed at
https://openrouter.ai/api/v1withOPENROUTER_API_KEY; a missing key throws as it already does for an explicit judge. evals doctornow recognizes the key, validates it with--probe, and reports judge models OpenRouter no longer serves as retired.- The default judge is unchanged; nothing else changes unless a model id starts with
openrouter/.