feat: send x-openrouter-experiment-ids from experimentIds option - #122
Conversation
|
I'll fix CI failures and address comments from users with write access that start with 'Devin'.
Original prompt from Abhinav
|
There was a problem hiding this comment.
Devin Review found 1 potential issue.
1 flag not posted on this PR by your GitHub settings — view it in Devin Review. (Configure)
| experimentIds: z | ||
| .array(z.string().regex(/^[a-z0-9][a-z0-9_.-]{0,63}$/)) | ||
| .min(1) | ||
| .max(16) | ||
| .optional(), |
There was a problem hiding this comment.
🔴 Experiments silently ignored by other benchmarks
When other benchmarks set experimentIds, their configs validate but requests omit the experiment header. Their inference builders discard experimentIds, so runs measure the default arm instead.
Learn more
The shared inference schema feeds all model benchmark configurations, so parsing accepts experimentIds for benchmarks besides airline and banking. Most benchmark layers construct inference objects by explicitly copying individual fields, such as makeSolver and wandrInferenceOverride, and never copy the new field. Search benchmarks use searchSolverOptionsFromConfig and their own request path, which likewise omits the header. Validated runs therefore complete without selecting their requested experiment.
Example: A gpqa_diamond run with experimentIds: ["jev-finish-deesc"] passes validation, but its model request lacks X-OpenRouter-Experiment-Ids and evaluates the unselected arm.
Recommended fix: Either forward experimentIds through every benchmark that accepts the shared schema, including the search request path, or expose it only in the benchmark schemas whose inference paths support it. Add regression coverage from benchmark config through sent headers for the supported paths.
Was this helpful? React with 👍 or 👎 to provide feedback.
TL;DR
Adds an
experimentIdsinference option that the harness sends asx-openrouter-experiment-ids, so benchmark runs can opt into live-configjev_routerexperiment arms.What changed?
InferenceOverrideSchema.experimentIds?: string[](1–16 IDs, same pattern as the router'sEXPERIMENT_NAME_PATTERN).GenerateConfig.experimentIds→ Responses request headerX-OpenRouter-Experiment-Ids: id1,id2.tau_bench_verified_airlineandtau3_bench_bankingagent inference. Other benchmarks can be wired the same way when needed.Why?
The router only applies an experiment arm when the request sends this header (OpenRouter org keys only). Before this change there was no way to run a benchmark against an arm. First use: A/B testing
jev-finish-deescagainstjev-finish-deesc-controlon tau-bench airline.How to test
Reviewer focus
experimentIdsis unset, so default runs are unchanged.Checklist
Link to Devin session: https://openrouter.devinenterprise.com/sessions/6b3d4738964a49649c5e97ec44a18f3e
Open in Devin Desktop: https://openrouter.devinenterprise.com/desktop/session/6b3d4738964a49649c5e97ec44a18f3e?variant=devin
Requested by: @abhinav-pola