Repository navigation
feat(verifiers): a judge sends the effort its route takes, and its grade records what each call carried - #891
Merged
Conversation
…ade records what each call carried The direct judge now sends the run's effort and thinking budget as LiteLLM's reasoning_effort and thinking where its route takes them (model_call.takes), leaving out and recording the rest; a value LiteLLM refuses fails the grade at once. A run's judge_effort and judge_max_thinking_tokens reach every judge. verifier_settings holds what the calls carried, not_sent what they couldn't, with the endpoint host and the config's temperature and seed. Each judge's grade keeps judge_calls, one record per call (JudgeUsage, beside the step's usage), and user_sim_judge's legacy calls, usage and cost come from those records. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… the merged request sent, and keeps them in a failed grade The request merges [model.params] and the judge's settings as a dict display, so a run's effort wins over the config's instead of raising. The settings recorded are read from that merged request, so an effort the config alone gives is recorded as sent. The settings and endpoint host are recorded before the first request, so a failed grade keeps them, and each request _prompt_llm_judge retries is a record of its own: a timed-out one a call of unknown usage, counted in the step's usage too, any other refused. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…age, and StepUsage gives it one call path JudgeUsage, the run's scope and its accessors move out of rubrics_verifier into judge_utils/judge_usage. StepUsage's call and cut_off_call share one private path, so JudgeUsage overrides each directly instead of telling them apart by a flag. _judge_directly finds the record by the usage it's handed, as _record_direct_call does. A direct call's record keeps its whole cost by Cost.KEYS, every key Cost.fields writes, rather than a copy of four of them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nge meets example.com, .org and .net are behind Cloudflare now, whose "Just a moment..." challenge meets CI's browsers, so the two tests that load them live failed on main and every branch. They load python.org, gnu.org and kernel.org beside wikipedia.org instead, none behind a challenge. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ys back, before any live certificate Six months back was inside python.org's certificate, so the egress proxy spliced it instead of re-signing. A certificate valid today lives at most 398 days, so 400 days back is outside every live site's. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
What changes
PR 2 of 4 for FD-5929 (G13, judges record how they ran). #877 already counts judge usage in
step_usage. This PR makes the judge send the settings it's given, and makes its grade say what it sent.The direct judge sends effort and a thinking budget. It sends the run's effort as LiteLLM's
reasoning_effortand itsmax_thinking_tokensasthinking({"type": "enabled", "budget_tokens": N}), each where LiteLLM takes it on the judge's route. The newmodel_call.takes(route, param)reads LiteLLM's own table of supported params to decide. Through a configured endpoint:reasoning_effortthinkingBefore this PR the direct judge sent neither setting, whatever the model.
One rule for both judge paths.
JudgeSettingRefusedwith LiteLLM's message, as GPT-5 refusesreasoning_effort="xhigh". An agent judge already failed this way, when its config check answered 400.A run's overrides reach every judge.
judge_effortandjudge_max_thinking_tokensused to apply to agent judges only. They now apply to direct judges anduser_sim_judgeas well.verifier_settingshold what was sent.effortandmax_thinking_tokensare what the calls carried,nullwhen left out.not_sentmaps each left-out setting to the value that was asked for.judge_endpoint_hostnames the host the calls reached.temperatureandseedappear when[model.params]gives them to a direct call.The grade keeps a record of each call. A new optional grade field,
judge_calls, holds one record per judge call, covering every batch, output retry and timeout retry:outcome:answered,refusedorcut_off, with the refusal'serror;modelandendpoint_host;usage, as core reads it;model_callgave it, the endpoint's bill when there was one;batchandattemptit belonged to.The records come from
JudgeUsage(verifiers/judge_utils/judge_usage.py), aStepUsagethat also keeps them, scoped to one run of the step. A failed grade keeps its records too, through the base's newgrade_fieldshook.Every request the direct judge sends is recorded, including retries. Each request that fails inside
_prompt_llm_judge's own retry loop is a record of its own. A request cut off by a timeout may have been billed, so it is a call of unknown usage and is also counted in the step's usage, marking that entry a lower bound. Before this PR, a timeout that was retried and then answered was left out ofstep_usage(#877). Any other failed request is recorded asrefusedand costs nothing.Settings are recorded from the merged request, before the first call. The judge reads what it sent from the merged request (
[model.params]under the judge's own settings), so an effort the config alone gives is recorded as sent. It records the settings and the endpoint host before its first call, so a failed grade keeps them. A run's effort replaces a configuredreasoning_effortinstead of raising.user_sim_judge's legacycalls,usageandcostnow come from those records. Its own counters andusage_totalare gone. Its legacyusagenow uses core'sUsagekeys (input_tokens,output_tokens,cache_read_tokens,cache_write_tokens,total_tokens), with input counting the cache as everywhere else. The golden is re-recorded; the counts are unchanged.Decisions (with Edgar, FD-5929)
A setting the judge doesn't take is left out and recorded. A value it refuses fails the grade. Both judge paths follow this.
The run's effort and thinking overrides apply to every judge.
The direct judge sends
max_thinking_tokensas LiteLLM'sthinking, where the route takes it.verifier_settingshold what was sent, withnot_sent.Per-call records go in a new grade field,
judge_calls, not inverifier_output.user_sim_judge's legacy fields are built from the same records, so usage has one reading.verifier_settingsrecord what the judge handed LiteLLM, not what LiteLLM put on the wire. LiteLLM maps effort per model:output_config.effort.low1024,medium2048). An explicitmax_thinking_tokenswins, and the effort is then dropped.Recording LiteLLM's own transform would tie core to a helper outside LiteLLM's documented API.
A Claude judge that thinks can't run with a configured temperature. Effort and a thinking budget turn on Claude's thinking, and Anthropic refuses thinking at any temperature but 1. So a Claude judge given effort or a budget, under a
temperaturein[model.params], fails its grade with Anthropic's message: "temperaturemay only be set to 1 when thinking is enabled". Neither setting wins over the other. The fix is to drop the config's temperature, or to give that judge no effort. I verified it through the real proxy: withtemperature: 0, a Claude Haiku 4.5 judge without effort grades, while Haiku 4.5 with effortlowand Sonnet 4.6 with efforthighare refused on all three attempts and fail. Before this PR the effort was ignored, so such a judge graded.Moves a score?
For stored tasks, no. No direct judge sets
effortormax_thinking_tokenstoday, so nothing they send changes.What does change. A task that later sets one, or a run that passes
judge_effort, gets a direct judge that thinks at that effort. It used to ignore it.Tests
test_rubrics_verifier_judge_settings.py, with LiteLLM faked:judge_effortreaches a direct judge;step_usageentry;step_usage;effortleaves it out and records that.judge_settings_wire_test.py(integration) uses LiteLLM's real client against the fake OpenAI endpoint over HTTP:reasoning_efforton the wire for GPT-5, with the thinking budget recorded as not sent;xhighnever reaches the endpoint.user_sim_judge's usage keys, and its golden.model_call.takeswas checked on core's real routes through a proxy:openai/gemini-2.5-pro): effort.E2E (real proxy, admin VM, head e020745)
Setup. The branch's wheels went into a fresh venv on an agent-environments-admin host. Every call went through a logging pass-through in front of Scale's LiteLLM proxy, and each grade was checked against what the proxy recorded for every request.
Direct judges, 6 of 6 as expected:
medium+ 2048 budgetmedium, budget 2048thinking.budget_tokens: 2048. LiteLLM gives Haiku no separate effort (decision 7)high+ 4096 budget, 3 batchesthinking4096 andoutput_config.effort: high, with the strict JSON schema acceptedhigh+ 2048 budgetnot_sentbothlow+ 2048 budgetnot_sentthe budgetreasoning_effort: lowxhighrefusedrecordjudge_effort: lowlow, inoverriddenthinking.budget_tokens: 1024Each record's output tokens equal the proxy's.
Bundles, through
agent-env run:low+ 2048 budget. Its card takes both, so both are recorded as sent, and each of its model calls carried the 2048 budget. One record for its turn, 2,017 output tokens, as the proxy counted.user_sim_judge. The legacy entry reads 7 calls, 13,338 input and 430 output tokens. The proxy saw 7 calls, 13,338 in and 430 out. There are 7 records, one per check batch. Its gpt-4.1-nano user sim slipped, so the judge voided the run, as it should.Chaos, 20 minutes, 352 runs. Each run drew a random model (Claude Haiku 4.5, Claude Sonnet 4.6, gpt-4o-mini, GPT-5 mini, gpt-4.1-mini), effort (none,
minimalthroughmax), thinking budget, batch size and run override, with 0%, 20% or 35% of requests faulted with a 500.gradedorfailed;answeredrecords equal the proxy's 200s; the records' output tokens equal the proxy's.model_call.cut_offalready says.minimalon Claude Sonnet 4.6. In 3 runs, LiteLLM sent nothing for that effort. The grade records it as handed to LiteLLM (decision 7).Model spend for all of it: $0.82 at list prices.
Known gap, from #877. A judge agent the step deploys itself carries no endpoint host, so its grade's
judge_endpoint_hostand itsstep_usageentry name none.Also: the live-site browser tests (folded in, as main is red on them)
Since about 18:56 UTC on 2026-11-23,
example.com,example.organdexample.netare served by Cloudflare, and its "Just a moment..." challenge meets CI's browsers. Two tests that load them live failed on main and on every branch:browser_clock_test.py::test_alone_the_browser_computer_keeps_real_time_and_its_live_sites_pass_through_the_egress_proxy;chromium_universe_test.py::test_its_boot_browser_loads_live_sites_at_any_universe_date_and_x_never_blanks.They now load
www.python.org,www.gnu.organdwww.kernel.org, besidewww.wikipedia.org. None of these is behind a bot challenge. The tests check that a live site loads through the egress proxy at any universe date, which doesn't depend on which site it is. Main's latest run also failscomputer/set_test.py, which isn't touched here.Docs
For FD-6446:
effortandmax_thinking_tokensnow reach direct judges;not_sentandjudge_callsmean;user_sim_judge'susagekeys changed.temperaturein[model.params].Part of FD-5929 (G13).
🤖 Generated with Claude Code


Confidence Score: 5/5
The PR appears safe to merge; no new actionable issue was found.Summary
The PR sends supported judge settings and records each call's outcome, usage, and cost.
user_sim_judgereports usage from its call records in core's token format.Reviews (8) · Last reviewed commit: "test(computers): the universe browser te..." · Reviewed by Greptile