Skip to content

fix(toolcall-schema-fuzz): tell the model the tools are simulated and repeats are intended - #214

Open
abhinav-pola wants to merge 1 commit into
mainfrom
devin/1796403404-fuzz-simulated-repeat
Open

abhinav-pola wants to merge 1 commit into
mainfrom
devin/1796403404-fuzz-simulated-repeat

Conversation

@abhinav-pola

@abhinav-pola abhinav-pola commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

TL;DR

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
  • Documentation is updated where needed

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

Devin Review

@devin-ai-integration

Copy link
Copy Markdown
Contributor

I'll fix CI failures and address comments from users with write access that start with 'Devin'.

  • Disable automatic comment, CI, and merge conflict monitoring

Original prompt from William

SYSTEM:
<latest_message>
William Kofski (U0BEW6P7NKD) [ts=1796392810.361319]: @Devin is this a real issue: https://openrouter.slack.com/archives/C07VASC21DJ/p1796369198376589?thread_ts=1795345094.967479&amp;cid=C07VASC21DJ
</latest_message>

=== BEGIN THREAD HISTORY (in #eng-benchmarks) ===
William Kofski (U0BEW6P7NKD) [ts=1796392810.361319]: @Devin is this a real issue: https://openrouter.slack.com/archives/C07VASC21DJ/p1796369198376589?thread_ts=1795345094.967479&amp;cid=C07VASC21DJ
=== END THREAD HISTORY ===
Channel ID: C0BMHG5CG1E
Thread URL: https://openrouter.slack.com/archives/C0BMHG5CG1E/p1796392810361319?thread_ts=1796392810.361319&amp;cid=C0BMHG5CG1E

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.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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.

Devin Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant