Repository navigation
fix(toolcall-schema-fuzz): score 400/422 rejections per sample and correct README - #146
Conversation
|
I'll fix CI failures and address comments from users with write access that start with 'Devin'.
Original prompt from Abhinav
|
| if (REJECTED_STATUSES.has(response.status)) { | ||
| return { | ||
| kind: "rejected", | ||
| status: response.status, | ||
| message, | ||
| } as const; |
There was a problem hiding this comment.
🔴 Invalid run configuration corrupts benchmark scores
When a run-wide option triggers HTTP 400, requestCompletion records every response as a sample rejection. The run completes with incorrect scores instead of exposing the invalid configuration.
Learn more
An HTTP 400 can reject the entire request configuration, not just a particular tool schema. This branch converts every 400 into a successful solver result. evaluateOne therefore scores it as a sample, and the run continues without detecting the shared error. A single invalid request option can make every case appear unsupported by the serving stack.
Example: If an invalid provider override makes the endpoint return HTTP 400 for every case, all 2,668 default cases receive request_rejected rather than stopping the run with an invalid-configuration error.
Recommended fix: Distinguish schema-specific validation failures from run-wide request/configuration failures using the response's validated error details. Only convert confirmed case-specific rejections to rejected; propagate other 400/422 responses as solver errors, and test both classes.
Was this helpful? React with 👍 or 👎 to provide feedback.
There was a problem hiding this comment.
Leaving this as is. The run isn't silent: each sample keeps the full upstream error text in its explanation, and cli/report.ts groups failures by category with an example. A misconfigured run therefore shows up as 2668/2668 request_rejected, all carrying the same message. Separating "schema rejected" from "config rejected" by parsing the error body won't work across stacks, because OpenAI, Anthropic, vLLM and Dynamo all word their 400s differently. That parsing is exactly what an external team pointing this at their own server would need, and it isn't reliable.
TL;DR
A stack that rejects a schema with HTTP 400/422 now fails just that sample as
request_rejected, so the run keeps going. Before, the CLI aborted on the first rejection. The README now matches what the code does and includes a verified run command.What changed?
solver.ts: 400 and 422 responses become a completed state withrawResponse.rejected = { status, message }. 429/5xx still retry. Other 4xx (401, 402, 403, 404) still abort the run.scorer.ts: newrequest_rejectedcategory, scored Incorrect.cli/report.tspicks it up through the explanation prefix.README.md:regressions.jsonis empty, soregressionserrors andsentinelis just the coverage subset.request_rejected.Why?
We're sharing this with external serving teams (NVIDIA Dynamo). Rejecting an unsupported schema keyword is a finding, so it shouldn't kill the run. For example, OpenAI rejects
format: uriand$refwith sibling keywords.How to test
Ran this end to end: the run completed all 2668 samples with exit 0, 2598 correct and 70
request_rejected. Onmainit aborts at the first'uri' is not a valid format400.Benchmark impact
Runs that used to abort now complete. Rejected samples score Incorrect. Scores for accepted samples don't change.
Reviewer focus
Checklist
Link to Devin session: https://openrouter.devinenterprise.com/sessions/69d66439a0a140fbb61647ab67ead2ec
Open in Devin Desktop: https://openrouter.devinenterprise.com/desktop/session/69d66439a0a140fbb61647ab67ead2ec?variant=devin
Requested by: @abhinav-pola