You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(toolcall-schema-fuzz): tell the model the tools are simulated and repeats are intended - #214
toolcall_schema_fuzz now tells the model that the run is an automated test with simulated tools, so models stop declining to repeat a call that looks like it has a side effect.
What changed?
TOOLCALL_SCHEMA_FUZZ_SYSTEM_MESSAGE (solver.ts) says the assistant is in an automated test of the tool-calling stack, every tool is simulated, and it should never decline or ask for confirmation.
repeatPrompt (tool-case.ts) prefixes the final user turn with SIMULATION_NOTE: the tools are simulated, no call has any real effect, and repeating a call that already succeeded is intended and safe.
wordings.test.ts asserts the note is in the prompt; the README documents the wording and the comparability break.
Why?
Every sample replays a successful tool call and then asks the model to "call the tool again with exactly the same arguments". The realistic wordings describe tools with side effects (ledger adjustments, votes, print jobs), and some descriptions say a call should happen only once. Some models answer in text instead, for example "I'm not going to re-run that call, it would post a second debit". The scorer records that as no_tool_call, but it is a model decision, and this benchmark is meant to isolate the serving stack.
How to test
bun test src/benchmarks/toolcall-schema-fuzz
OPENROUTER_API_KEY=... bun run bench --benchmark toolcall_schema_fuzz \
--model <model> --solver-config '{"providerOnly":["<provider>"]}' --concurrency 32
Expected: no_tool_call failures whose response is a text refusal disappear.
Manual check: 37 cases that one model had refused before, 3 attempts each, one pinned provider, temperature 0. With the old wording 71 of 111 responses were text instead of a tool call; with the new wording 0 of 111 were. (3 further cases were rejected by the provider with HTTP 422 under both wordings.)
Benchmark impact
Scores change for every model, because the system message and the final user turn are different for all samples. Results from before this change are not comparable with later ones. Sample ids, tools, schemas, expected calls and the scorer are unchanged.
Reviewer focus
The exact wording of SIMULATION_NOTE and the system message.
The system message is shared with realistic/rewriter.ts and discovery/openrouter-probe.ts, so the reword checker and discovery probe use the new wording too.
Checklist
Tests cover changed behavior
Public API or configuration changes are backward compatible, or the break is documented
Benchmark changes document dataset provenance and licensing
No credentials, private results, or restricted dataset contents are included
The <latest_message> is the message that you should use to guide your goals + task for this session, and you should use the rest of the slack thread as context.
A [ts=...] marker on a Slack message is that message's timestamp. To act on a specific message with the slack tool (e.g. adding an emoji reaction via the reaction command), pass that value as timestamp along with the Channel ID — no extra lookup call is needed.
The reason will be displayed to describe this comment to others. Learn more.
✅ Devin Review: No Issues Found
Devin Review analyzed this PR and found no bugs or issues to report.
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
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.
TL;DR
toolcall_schema_fuzznow tells the model that the run is an automated test with simulated tools, so models stop declining to repeat a call that looks like it has a side effect.What changed?
TOOLCALL_SCHEMA_FUZZ_SYSTEM_MESSAGE(solver.ts) says the assistant is in an automated test of the tool-calling stack, every tool is simulated, and it should never decline or ask for confirmation.repeatPrompt(tool-case.ts) prefixes the final user turn withSIMULATION_NOTE: the tools are simulated, no call has any real effect, and repeating a call that already succeeded is intended and safe.wordings.test.tsasserts the note is in the prompt; the README documents the wording and the comparability break.Why?
Every sample replays a successful tool call and then asks the model to "call the tool again with exactly the same arguments". The realistic wordings describe tools with side effects (ledger adjustments, votes, print jobs), and some descriptions say a call should happen only once. Some models answer in text instead, for example "I'm not going to re-run that call, it would post a second debit". The scorer records that as
no_tool_call, but it is a model decision, and this benchmark is meant to isolate the serving stack.How to test
Expected:
no_tool_callfailures whose response is a text refusal disappear.Manual check: 37 cases that one model had refused before, 3 attempts each, one pinned provider, temperature 0. With the old wording 71 of 111 responses were text instead of a tool call; with the new wording 0 of 111 were. (3 further cases were rejected by the provider with HTTP 422 under both wordings.)
Benchmark impact
Scores change for every model, because the system message and the final user turn are different for all samples. Results from before this change are not comparable with later ones. Sample ids, tools, schemas, expected calls and the scorer are unchanged.
Reviewer focus
SIMULATION_NOTEand the system message.realistic/rewriter.tsanddiscovery/openrouter-probe.ts, so the reword checker and discovery probe use the new wording too.Checklist
Link to Devin session: https://openrouter.devinenterprise.com/sessions/d6c0e7197d674f2387e0801b8198e8cd
Open in Devin Desktop: https://openrouter.devinenterprise.com/desktop/session/d6c0e7197d674f2387e0801b8198e8cd?variant=devin
Requested by: @willkofski-xyz
🟢 Devin Review found nothing to fix · View findings