Repository navigation
fix(evals): Support any provider key, default CI to OpenRouter - #563
Merged
Merged
Conversation
The evals workflow only wired WARDEN_ANTHROPIC_API_KEY, which Warden's own CI no longer uses, so the job failed before running any evals. - Add WARDEN_EVAL_MODEL and WARDEN_EVAL_JUDGE_MODEL. A model override replaces every scenario model, forces the Pi runtime, and enables the suites without an Anthropic key. - Run the LLM judge through Warden's Pi runtime instead of the Anthropic SDK, so it can use any provider. Drop the @anthropic-ai/sdk dependency. - CI defaults to openrouter/anthropic/claude-sonnet-4.6 with WARDEN_OPENROUTER_API_KEY, the same model as before on a key the repo already uses. The verify step checks the key for the selected provider, and the status check no longer reports a second, misleading "results file not found" error when verification fails. Co-Authored-By: Jeffrey Hung <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
The eval configs alias @sentry/warden to its source, but warden's config schema imports @sentry/warden-service-api, which resolves to an unbuilt dist/ in the evals job. Every suite failed to import, so no results were recorded. Alias it to source the same way. Co-Authored-By: Claude <[email protected]>
# Conflicts: # pnpm-lock.yaml
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit af2f7ee. Configure here.
With a model override, extraction repair, verification, and merge still ran on Pi's default model because the eval runner never set auxiliaryModel or synthesisModel. Forward the eval model to both so OpenRouter-only runs stay on the configured provider.
Jeffreyhung
approved these changes
Nov 4, 2026
sentry-junior Bot
added a commit
that referenced
this pull request
Nov 5, 2026
CI now runs evals on OpenRouter (#563). roach.json allowed only api.anthropic.com, so Roach refused OpenRouter calls and every pipeline eval stopped with "Provider unavailable". Allow and match the OpenRouter and OpenAI model APIs, and redact their keys.
3 tasks done
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

The
evalsjob fails before running anything on PRs that touchpackages/evals/(e.g. #562):WARDEN_ANTHROPIC_API_KEY is required to run evals in CI. The workflow only wires the Anthropic secret. Warden's own review workflow dropped that key in #434 and runs onWARDEN_OPENROUTER_API_KEY, which resolves fine on the same PRs. The evals harness was also hardcoded to Anthropic: suites skipped withoutANTHROPIC_API_KEY, and the judge called the Anthropic SDK directly.Changes
Provider selection (
packages/evals/src/provider.ts)WARDEN_EVAL_MODEL: a Piprovider/modelselector. When set, it replaces every scenario's model, forces the Pi runtime, and enables the suites without an Anthropic key.WARDEN_EVAL_JUDGE_MODEL: optional judge model. Defaults toWARDEN_EVAL_MODEL, thenanthropic/claude-sonnet-4-6.WARDEN_<PROVIDER>_API_KEYconvention, which eval setup already bridges to the SDK's env name.Judge
runJudgenow goes throughgetRuntime('pi').runAuxiliarywith the configured model instead ofnew Anthropic(). Same prompt, same verdict-count validation, same fail-closed fallback.eval_judgeauxiliary task name so judge calls are labeled in telemetry.@anthropic-ai/sdkis no longer a dependency ofwarden-evals.Workflow
WARDEN_EVAL_MODELdefaults toopenrouter/anthropic/claude-sonnet-4.6. That's the same model the suites already pin, so scores stay comparable, on the OpenRouter key the repo already has. TheWARDEN_EVAL_MODEL/WARDEN_EVAL_JUDGE_MODELrepo variables override it.WARDEN_OPENROUTER_API_KEY,WARDEN_ANTHROPIC_API_KEY, andWARDEN_OPENAI_API_KEY. Unset secrets are empty and harmless.WARDEN_<PROVIDER>_API_KEYfor each selected model and names the missing one.Eval results file not foundon top of the real error.This PR touches
evals.yml, so its ownevalsrun exercises the OpenRouter path end to end.Verification
provider.test.tsandjudge.test.ts.harness.test.tswas updated for the new judge options. The evals unit suite passes: 69 tests.pnpm lint,pnpm build, and typecheck all pass. The Wardensrc/sdktests pass.pnpm evalsskips all 62 evals, same as before.WARDEN_EVAL_MODEL=openrouter/anthropic/claude-sonnet-4.6and a fake key, the run reaches OpenRouter on Pi and fails withAuthentication required.. Without a key it fails locally withNo API key found for openrouter.Notes
<PROVIDER>_API_KEY(e.g.vercel-ai-gateway→AI_GATEWAY_API_KEY) still work locally via the SDK's own env name. In CI the verify step expects theWARDEN_-prefixed form, so adding one means adding that secret to the workflow env.via Jeffrey Hung.
--
View Session [Sentry]