From 5e3d9c735e9f8c35e35a11f0f1f31922b6b7a7a1 Mon Sep 17 00:00:00 2001 From: Etienne Filhol Date: Mon, 30 Nov 2026 17:21:55 +0100 Subject: [PATCH 1/2] feat(standard): a benchmark can run every agent with its web tools off --- .../catalogue/agents/claude-code/agent.json | 13 +++ .../agents/claude-code/claude-settings.json | 3 +- app/nullius/catalogue/agents/codex/agent.json | 13 +++ .../catalogue/agents/codex/config.toml | 1 + .../catalogue/agents/opencode/agent.json | 13 +++ .../catalogue/agents/opencode/opencode.json | 2 +- app/nullius/standard/contract/definitions.py | 35 ++++++- app/nullius/standard/pages/recipe.py | 9 +- app/nullius/standard/requirements/install.py | 2 +- app/nullius/standard/runner/run.py | 4 +- app/static/builder/command-builder.js | 2 + app/tests/test_standard_options.py | 92 +++++++++++++++++++ docs/agents/supported/claude-code.md | 1 + docs/agents/supported/codex.md | 1 + docs/agents/supported/opencode.md | 1 + docs/cli/run.md | 2 +- docs/standard.md | 5 +- 17 files changed, 188 insertions(+), 11 deletions(-) diff --git a/app/nullius/catalogue/agents/claude-code/agent.json b/app/nullius/catalogue/agents/claude-code/agent.json index 070e6c278..eb3aae1f6 100644 --- a/app/nullius/catalogue/agents/claude-code/agent.json +++ b/app/nullius/catalogue/agents/claude-code/agent.json @@ -49,6 +49,19 @@ "max" ], "default": "default" + }, + "web_tools": { + "label": "Web tools", + "summary": "WebSearch and WebFetch, Claude Code's web tools: `off` denies both in its settings, `default` leaves them as it ships.", + "values": [ + "default", + "off" + ], + "default": "default", + "writes": { + "default": "", + "off": "\"WebSearch\", \"WebFetch\"" + } } }, "fidelity": { diff --git a/app/nullius/catalogue/agents/claude-code/claude-settings.json b/app/nullius/catalogue/agents/claude-code/claude-settings.json index 5473423d1..26e8ab9c0 100644 --- a/app/nullius/catalogue/agents/claude-code/claude-settings.json +++ b/app/nullius/catalogue/agents/claude-code/claude-settings.json @@ -1,5 +1,6 @@ { "permissions": { - "defaultMode": "bypassPermissions" + "defaultMode": "bypassPermissions", + "deny": [{opt_web_tools}] } } diff --git a/app/nullius/catalogue/agents/codex/agent.json b/app/nullius/catalogue/agents/codex/agent.json index 9ce686846..dece5ecc0 100644 --- a/app/nullius/catalogue/agents/codex/agent.json +++ b/app/nullius/catalogue/agents/codex/agent.json @@ -37,6 +37,19 @@ "high" ], "default": "medium" + }, + "web_tools": { + "label": "Web tools", + "summary": "web_search, the search OpenAI runs for Codex: `off` writes web_search = \"disabled\" into its config.toml, `default` leaves Codex's own.", + "values": [ + "default", + "off" + ], + "default": "default", + "writes": { + "default": "", + "off": "web_search = \"disabled\"" + } } }, "default": "2.2.2", diff --git a/app/nullius/catalogue/agents/codex/config.toml b/app/nullius/catalogue/agents/codex/config.toml index caa8de761..2d97b45fa 100644 --- a/app/nullius/catalogue/agents/codex/config.toml +++ b/app/nullius/catalogue/agents/codex/config.toml @@ -13,6 +13,7 @@ model_reasoning_effort = "{opt_reasoning_effort}" model_provider = "nullius" approval_policy = "never" sandbox_mode = "danger-full-access" +{opt_web_tools} [features] plugins = false diff --git a/app/nullius/catalogue/agents/opencode/agent.json b/app/nullius/catalogue/agents/opencode/agent.json index f83d5ccc7..1d6dbdf5e 100644 --- a/app/nullius/catalogue/agents/opencode/agent.json +++ b/app/nullius/catalogue/agents/opencode/agent.json @@ -58,6 +58,19 @@ "xhigh" ], "default": "medium" + }, + "web_tools": { + "label": "Web tools", + "summary": "webfetch, OpenCode's web tool: `off` denies it in its permissions, `default` allows it, as Nullius runs OpenCode without asking.", + "values": [ + "default", + "off" + ], + "default": "default", + "writes": { + "default": "allow", + "off": "deny" + } } } } diff --git a/app/nullius/catalogue/agents/opencode/opencode.json b/app/nullius/catalogue/agents/opencode/opencode.json index 383637f8b..90d1242ea 100644 --- a/app/nullius/catalogue/agents/opencode/opencode.json +++ b/app/nullius/catalogue/agents/opencode/opencode.json @@ -8,7 +8,7 @@ "permission": { "edit": "allow", "bash": "allow", - "webfetch": "allow", + "webfetch": "{opt_web_tools}", "external_directory": "deny" }, "provider": { diff --git a/app/nullius/standard/contract/definitions.py b/app/nullius/standard/contract/definitions.py index 059e23de2..15d692d2a 100644 --- a/app/nullius/standard/contract/definitions.py +++ b/app/nullius/standard/contract/definitions.py @@ -172,7 +172,7 @@ def setup_label(bench, which): MAX_RETRIES = 9 # the most retries of a failed attempt (runner.retries, cli run --retries) # What a benchmark's version may say for itself: its data, its driver, how it scores, who plays its user, its environments. BENCH_VERSIONED = ("upstream", "datasets", "task_parts", "files", "driver", "mcp_servers", "score", "simulator", "limits", "controls", "environments", - "options", "host", "setups", "proven", "leaderboard") + "options", "host", "setups", "proven", "leaderboard", "agent_options") # What a benchmark option may need: embedding and reranker models through the relay, # machine requirements (host), and digest-pinned auxiliary files. NEED_KEYS = ("embeddings", "reranker", "host", "files") @@ -546,6 +546,9 @@ def _options(d: dict) -> List[str]: bad.append(f"{w}.example: a value its pattern allows besides its default, shown in its place") if option_problem(o, o.get("default")): bad.append(f"{w}.default: the vendor's own default, a value it allows") + wr = o.get("writes") + if wr is not None and not ("values" in o and isinstance(wr, dict) and wr and all(k in o["values"] and isinstance(t, str) for k, t in wr.items())): + bad.append(f"{w}.writes: {{value: the text its slot writes for it}}, for some of its values") for where, n in _option_slots(d): if n not in opts: bad.append(f"{where}: {{opt_{n}}} is not an option (options.{n})") @@ -759,6 +762,32 @@ def options_of(d: dict, given: Optional[dict] = None) -> Tuple[dict, List[str]]: return {n: given.get(n, o.get("default")) for n, o in opts.items()}, bad +def agent_options_of(bench: dict, d: dict, given: Optional[dict] = None) -> Tuple[dict, List[str]]: + """:func:`options_of` for a run of ``bench``: an agent that has an option the benchmark sets for every + agent (``agent_options``, as its rules require) runs with that value; another value given is refused.""" + vals, bad = options_of(d, given) + if d.get("_kind") != "agent": + return vals, bad + opts, given = d.get("options") or {}, given or {} + for n, v in (bench.get("agent_options") or {}).items(): + if n not in opts: + continue # it has no such setting: nothing of it to set + if given.get(n, v) != v: + bad.append(f"{bench.get('label') or bench.get('key')} runs every agent with {n}={v}, not {given[n]}") + why = option_problem(opts[n], v) + if why: + bad.append(f"option {n}: {why}, and {bench.get('label') or bench.get('key')} runs every agent with {n}={v}") + vals[n] = v + return vals, bad + + +def option_slots(d: dict, values: dict) -> Dict[str, str]: + """The ``{opt_}`` slots of ``d``'s templates for the run's ``values``: what each option ``writes`` + for its value, else the value itself.""" + opts = d.get("options") or {} + return {"opt_" + n: str(((opts.get(n) or {}).get("writes") or {}).get(v, v)) for n, v in values.items()} + + def _command(where: str, cmd, slots=SLOTS, word=_WORD) -> List[str]: if not isinstance(cmd, list) or not cmd or not all(isinstance(w, str) for w in cmd): return [f"{where}: a list of words"] @@ -1624,6 +1653,10 @@ def problems(d: dict, kind: str) -> List[str]: bad += _host(d) bad += _files(d) bad += _bench_options(d) + ao = d.get("agent_options") + if ao is not None and not (isinstance(ao, dict) and all(_OPTION.match(str(n)) and isinstance(v, str) and _OPTION_VALUE.match(v) + for n, v in ao.items())): + bad.append("agent_options: {an agent option's name: the value every agent that has it runs with}") drv = d.get("driver") or {} bad += _command("driver.command", drv.get("command") if isinstance(drv, dict) else None, {"here", "install"}) if isinstance(drv, dict): diff --git a/app/nullius/standard/pages/recipe.py b/app/nullius/standard/pages/recipe.py index feeebab74..805ec84e0 100644 --- a/app/nullius/standard/pages/recipe.py +++ b/app/nullius/standard/pages/recipe.py @@ -214,6 +214,8 @@ def _bench_page(b: dict) -> dict: "experiment_judge": {k: v for k, v in ((b.get("score") or {}).get("experiment_judge") or {}).items() if k in ("label", "model")} or None, # what the upstream's leaderboard fixes besides the ranked model (Like the leaderboard) "leaderboard": b.get("leaderboard") or None, + # what every agent that has the option runs with on this benchmark, as its rules require + "agent_options": b.get("agent_options") or {}, "attempts": (b.get("limits") or {}).get("attempts", ""), "retries": (b.get("limits") or {}).get("retries", 0), # what a unit's time limits and a conversation's length are when the recipe forces none @@ -606,7 +608,8 @@ def add(step, message, shown=False, field=None, unset=False): if not isinstance(given, dict) or not all(isinstance(v, str) for v in given.values()): add("agent", "Options are names with a word each.") given = {} - opts, bad = definitions.options_of(o, given) + given = {k: v for k, v in given.items() if k not in (b.get("agent_options") or {})} # the benchmark's own, shown fixed + opts, bad = definitions.agent_options_of(b, o, given) for why_not in bad: add("agent", f"{o['label']}: " + why_not) picks.append({"o": o, "control": control, "given": given, "opts": opts}) @@ -1067,7 +1070,9 @@ def row(p: dict) -> list: p.get("agent") and p["agent"]["start"]["driver"]["agent"] in b["options"][k]["when"]["agent"] for p in picks)], *[row(p) for p in picks], *[[STEP["agent"], "Options" + (f" of {p['o']['label']}" if several else ""), - ", ".join(f"{(p['o'].get('options') or {}).get(k, {}).get('label') or k.replace('_', ' ').capitalize()} {v}" + ("" if k in p["given"] else " (its default)") for k, v in p["opts"].items())] + ", ".join(f"{(p['o'].get('options') or {}).get(k, {}).get('label') or k.replace('_', ' ').capitalize()} {v}" + + (f" ({b['label']}'s)" if k in (b.get("agent_options") or {}) else "" if k in p["given"] else " (its default)") + for k, v in p["opts"].items())] for p in picks if p["opts"]], [STEP["model"], "Model", "none: a control calls no model" if out["keyless"] else f"{providers.label(providers.choice(provider, str(recipe.get('endpoint') or '')))} ยท " + (model if needs_model else ", ".join(p["o"]["sent"] for p in picks if p.get("setup")) or "the judge only") diff --git a/app/nullius/standard/requirements/install.py b/app/nullius/standard/requirements/install.py index 336f77041..bada1c6a1 100644 --- a/app/nullius/standard/requirements/install.py +++ b/app/nullius/standard/requirements/install.py @@ -267,7 +267,7 @@ def process_env(d: dict, where: str, home: str, options: Optional[dict] = None) ``env`` rendered (``{opt_}`` from ``options``, the run's values), and ``HF_HUB_CACHE`` when it prefetched models.""" slots = {"install": where, "home": home, "here": d.get("_here", ""), - **{"opt_" + k: v for k, v in (options or {}).items()}} + **definitions.option_slots(d, options or {})} out = {} if (d.get("install") or {}).get("prefetch"): out["HF_HUB_CACHE"] = os.path.join(where, HF) diff --git a/app/nullius/standard/runner/run.py b/app/nullius/standard/runner/run.py index 2e2066b46..22aac93c1 100644 --- a/app/nullius/standard/runner/run.py +++ b/app/nullius/standard/runner/run.py @@ -356,7 +356,7 @@ def agent_env(agent: dict, inst: str, home: str, base_url: str, model: str, opti ``{opt_}``; an option left out is filled with its default.""" options = definitions.options_of(agent, options)[0] slots = {"base_url": base_url, "base": base_url.removesuffix("/v1"), "key": relay.PLACEHOLDER_KEY, "model": model, "home": home, - **{"opt_" + k: v for k, v in options.items()}} + **definitions.option_slots(agent, options)} m = agent.get("model") or {} for dest, src in (m.get("files") or {}).items(): path = _render(dest, slots) @@ -886,7 +886,7 @@ def __init__(self, bench: dict, other: dict, *, model: str, provider: str, datas self.licences = licences or Licences(bench) # where a benchmark's environments find the licences they need self.unsandboxed = bool(unsandboxed) self.image = "" - self.options, bad = definitions.options_of(other, options) + self.options, bad = definitions.agent_options_of(bench, other, options) if bad: raise Refused("; ".join(bad)) # A benchmark scored by a model: its official judge, or the one asked for; its calls go through the relay diff --git a/app/static/builder/command-builder.js b/app/static/builder/command-builder.js index 72fe82cde..ea60caa32 100644 --- a/app/static/builder/command-builder.js +++ b/app/static/builder/command-builder.js @@ -831,6 +831,8 @@ const chosen = others.filter(o => C.chosenOf(rec).includes(o.key) && !o.why.length), mine = chosen.filter(o => !o.own); const optionsOf = o => { const mine = (rec.options || {})[o.key] || {}, opts = Object.entries(o.options || {}); return !opts.length ? '' : `
` + opts.map(([n, x]) => { + // one the benchmark sets for every agent that has it (recipe.py: agent_options), as its rules require + if ((b.agent_options || {})[n] !== undefined) return fixed(words(n), b.agent_options[n], b.label); const cur = mine[n] ?? x.default; return x.values ? `` diff --git a/app/tests/test_standard_options.py b/app/tests/test_standard_options.py index d6f9863fe..db7874703 100644 --- a/app/tests/test_standard_options.py +++ b/app/tests/test_standard_options.py @@ -9,6 +9,7 @@ import re import shutil import tempfile +import tomllib import unittest from nullius.standard import cli @@ -64,6 +65,15 @@ def test_a_bundled_pattern_has_an_example_only_beside_a_word_default(self): if "pattern" in o: self.assertEqual("example" in o, not number.match(str(o.get("default"))), f"{d['_ref']} {n}") + def test_writes_names_some_of_its_values_and_the_text_each_puts_in_its_slot(self): + self.assertEqual(definitions.problems(agent(options={"effort": dict(EFFORT, writes={"high": "max", "low": ""})}), "agent"), []) + for writes in ({}, {"max": "x"}, {"high": 3}, ["high"]): + with self.subTest(writes=writes): + self.assertIn("options.effort.writes: {value: the text its slot writes for it}, for some of its values", + definitions.problems(agent(options={"effort": dict(EFFORT, writes=writes)}), "agent")) + pattern = {"summary": "s", "pattern": "^[0-9]+$", "default": "40", "writes": {"40": "x"}} + self.assertTrue(definitions.problems(agent(options={"effort": pattern}), "agent")) + def test_a_name_and_a_summary(self): bad = definitions.problems(agent(options={"Effort": dict(EFFORT), "effort": dict(EFFORT, summary="")}), "agent") self.assertIn("options: 'Effort' is not a name (lower case letters and _)", bad) @@ -121,6 +131,67 @@ def test_the_slots_are_filled_in_variables_files_and_its_own_env(self): self.assertEqual(env["BOT_EFFORT"], "medium") # nothing set: the vendor's default, written out +class Writes(unittest.TestCase): + def test_a_value_writes_its_own_text_and_the_others_themselves(self): + here, home = tempfile.mkdtemp(), tempfile.mkdtemp() + self.addCleanup(shutil.rmtree, here) + self.addCleanup(shutil.rmtree, home) + with open(os.path.join(here, "conf.json"), "w") as f: + f.write('{"deny": [{opt_effort}]}') + d = agent(_here=here, model={"apis": ["chat"], "env": {"BOT_EFFORT": "{opt_effort}"}, "files": {"{home}/conf.json": "conf.json"}}, + options={"effort": dict(EFFORT, writes={"high": '"Web"', "medium": ""})}) + for value, deny, env in (("high", ["Web"], '"Web"'), ("medium", [], ""), ("low", None, "low")): + with self.subTest(value=value): + got = run.agent_env(d, here, home, "http://relay/v1", "m-1", {"effort": value}) + self.assertEqual(got["BOT_EFFORT"], env) + with open(os.path.join(home, "conf.json")) as f: + text = f.read() + self.assertEqual(json.loads(text)["deny"] if deny is not None else text, deny if deny is not None else '{"deny": [low]}') + + def test_each_bundled_web_switch_keeps_its_file_valid_and_turns_the_tools_off(self): + """Claude Code, Codex and OpenCode: what `web_tools` writes into each one's settings, as the vendor reads it.""" + files = {"claude-code": (".claude/settings.json", json.loads, lambda d: d["permissions"]["deny"], [], ["WebSearch", "WebFetch"]), + "codex": (".codex/config.toml", tomllib.loads, lambda d: d.get("web_search"), None, "disabled"), + "opencode": (".config/opencode/opencode.json", json.loads, lambda d: d["permission"]["webfetch"], "allow", "deny")} + for key, (path, parse, switch, on, off) in files.items(): + for value, expected in (("default", on), ("off", off)): + with self.subTest(agent=key, value=value): + home = tempfile.mkdtemp() + self.addCleanup(shutil.rmtree, home) + run.agent_env(definitions.get("agent", key, definitions.CATALOGUE), "/inst", home, "http://relay/u/v1", "m-1", {"web_tools": value}) + with open(os.path.join(home, path)) as f: + self.assertEqual(switch(parse(f.read())), expected) + + +class ABenchmarksOwn(unittest.TestCase): + """A benchmark whose rules fix an agent setting (``agent_options``): every agent that has it runs with that value.""" + BENCH = {"key": "fixed", "label": "Fixed", "agent_options": {"effort": "high"}} + + def test_an_agent_that_has_the_option_runs_with_the_benchmarks_value(self): + a = dict(agent(), _kind="agent") + self.assertEqual(definitions.agent_options_of(self.BENCH, a), ({"effort": "high"}, [])) + self.assertEqual(definitions.agent_options_of(self.BENCH, a, {"effort": "high"}), ({"effort": "high"}, [])) + vals, bad = definitions.agent_options_of(self.BENCH, a, {"effort": "low"}) + self.assertEqual(bad, ["Fixed runs every agent with effort=high, not low"]) + + def test_an_agent_without_it_or_another_kind_runs_as_it_is(self): + self.assertEqual(definitions.agent_options_of(self.BENCH, dict(agent(options={}), _kind="agent")), ({}, [])) + self.assertEqual(definitions.agent_options_of(self.BENCH, dict(agent(), _kind="capability")), ({"effort": "medium"}, [])) + + def test_a_value_the_agent_does_not_allow_is_said(self): + bench = dict(self.BENCH, agent_options={"effort": "max"}) + self.assertEqual(definitions.agent_options_of(bench, dict(agent(), _kind="agent"))[1], + ["option effort: 'max' is not one of low, medium, high, and Fixed runs every agent with effort=max"]) + + def test_the_field_is_names_and_plain_words(self): + bench = definitions.get("benchmark", "fakebench", ROOT) + self.assertEqual(definitions.problems(dict(bench, agent_options={"web_tools": "off"}), "benchmark"), []) + for bad in (["web_tools"], {"Web": "off"}, {"web_tools": "a b"}, {"web_tools": 1}): + with self.subTest(agent_options=bad): + self.assertIn("agent_options: {an agent option's name: the value every agent that has it runs with}", + definitions.problems(dict(bench, agent_options=bad), "benchmark")) + + class InARun(unittest.TestCase): def setUp(self): self.tmp = tempfile.mkdtemp() @@ -152,6 +223,17 @@ def test_a_value_it_does_not_allow_is_refused_before_anything_starts(self): unsandboxed=True, options={"effort": "max"}) self.assertIn("'max' is not one of low, medium, high", str(e.exception)) + def test_the_benchmarks_own_value_is_the_runs_and_another_is_refused(self): + bench = dict(definitions.get("benchmark", "fakebench", ROOT), agent_options={"effort": "high"}) + job = run.run(bench, self.fake(), model="m-1", provider="custom", jobs_root=self.tmp, limit=1, concurrency=1, + env={"MODEL_API_URL": "http://127.0.0.1:9/v1"}, say=lambda s: None, unsandboxed=True) + with open(os.path.join(job, "config.json")) as f: + self.assertEqual(json.load(f)["standard"]["options"], {"effort": "high"}) + with self.assertRaises(run.Refused) as e: + run.Run(bench, self.fake(), model="m-1", provider="custom", jobs_root=self.tmp, env={"MODEL_API_URL": "http://x/v1"}, + unsandboxed=True, options={"effort": "low"}) + self.assertIn("runs every agent with effort=high, not low", str(e.exception)) + def test_the_cli_reads_name_equals_value(self): self.assertEqual(cli.options(["effort=high", "speed = a"]), {"effort": "high", "speed": "a"}) with self.assertRaises(SystemExit): @@ -208,6 +290,16 @@ def test_an_option_with_a_label_is_named_by_it(self): d["agent"] = [dict(a, options={"effort": dict(EFFORT, label="Thinking")}) for a in d["agent"]] self.assertIn(["Options", "Thinking medium (its default)"], [r[1:] for r in recipe.compile(self.recipe(), d)["review"]]) + def test_the_benchmarks_own_value_is_shown_fixed_and_never_sent_otherwise(self): + d = self.defs() + d["benchmark"] = [dict(b, agent_options={"effort": "high"}) for b in d["benchmark"]] + label = next(b["label"] for b in d["benchmark"] if b["key"] == "fakebench") + out = recipe.compile(self.recipe(options={"effort": "low"}), d) # a recipe saved before: its value gives way + self.assertEqual(out["errors"], []) + self.assertNotIn("--option", out["script"]) + self.assertIn(["Options", f"Effort high ({label}'s)"], [r[1:] for r in out["review"]]) + self.assertEqual(recipe._bench_page(d["benchmark"][0])["agent_options"], {"effort": "high"}) + def test_a_value_it_does_not_allow_is_the_agent_steps_error(self): out = recipe.compile(self.recipe(options={"effort": "x; rm -rf"}), self.defs()) self.assertEqual([e["step"] for e in out["errors"]], [recipe.STEP["agent"]]) diff --git a/docs/agents/supported/claude-code.md b/docs/agents/supported/claude-code.md index 51147c567..a2da38a89 100644 --- a/docs/agents/supported/claude-code.md +++ b/docs/agents/supported/claude-code.md @@ -27,6 +27,7 @@ Anthropic's coding agent. | Option | Values, default in bold | What it sets | Versions | |---|---|---|---| | `reasoning_effort` | **`default`**, `low`, `medium`, `high`, `xhigh`, `max` | How much effort a supported model spends, with `default` leaving Claude Code's own level. | every version | +| `web_tools` | **`default`**, `off` | WebSearch and WebFetch, Claude Code's web tools: `off` denies both in its settings, `default` leaves them as it ships. | every version | ## Benchmarks it fits diff --git a/docs/agents/supported/codex.md b/docs/agents/supported/codex.md index f1f595e28..9c576ca46 100644 --- a/docs/agents/supported/codex.md +++ b/docs/agents/supported/codex.md @@ -30,6 +30,7 @@ OpenAI's coding agent. | Option | Values, default in bold | What it sets | Versions | |---|---|---|---| | `reasoning_effort` | `minimal`, `low`, **`medium`**, `high` | How much reasoning the model uses before answering. | every version | +| `web_tools` | **`default`**, `off` | web_search, the search OpenAI runs for Codex: `off` writes web_search = "disabled" into its config.toml, `default` leaves Codex's own. | every version | ## Benchmarks it fits diff --git a/docs/agents/supported/opencode.md b/docs/agents/supported/opencode.md index 004f8ba11..df46c1419 100644 --- a/docs/agents/supported/opencode.md +++ b/docs/agents/supported/opencode.md @@ -26,6 +26,7 @@ The open-source terminal coding agent. | Option | Values, default in bold | What it sets | Versions | |---|---|---|---| | `reasoning_effort` | `none`, `minimal`, `low`, **`medium`**, `high`, `xhigh` | How much reasoning a supported model uses before answering. | every version | +| `web_tools` | **`default`**, `off` | webfetch, OpenCode's web tool: `off` denies it in its permissions, `default` allows it, as Nullius runs OpenCode without asking. | every version | ## Benchmarks it fits diff --git a/docs/cli/run.md b/docs/cli/run.md index 4b0fec5fd..eb345cba3 100644 --- a/docs/cli/run.md +++ b/docs/cli/run.md @@ -32,7 +32,7 @@ nullius standard run locomo model --model gpt-4o-mini | `--unsandboxed` | An agent runs as you; else `--backend container` | | `--backend` | `local` (default); `container`, each unit in a container with its relay; or [`boat`](../standard.md#the-boat-backend), a VM per unit | | `--boat-size` | Boat's VM size: `small` (default), `default`, `large`, `xlarge` | -| `--option NAME=VALUE` | An agent's or capability's option (repeatable) | +| `--option NAME=VALUE` | An agent's or capability's option (repeatable); one the benchmark sets for every agent (`agent_options`) cannot be given another value | | `--bench-option NAME=VALUE` | A benchmark's option (repeatable) | | `--price MODEL=INPUT,OUTPUT[,CACHED,WRITE,WRITE_1H]` | This run's price for a model in USD per million tokens (repeatable), over your [price list](../settings/model-prices.md) | | `--max-usd USD`, `--max-usd-per-unit USD` | A spending cap for the run, for each unit: [below](#a-spending-cap) | diff --git a/docs/standard.md b/docs/standard.md index 2700c1d9a..e0a23eed2 100644 --- a/docs/standard.md +++ b/docs/standard.md @@ -447,6 +447,7 @@ An `answer` or `score` error that begins `EnvironmentSetupError: `, `VerifierErr | `score.experiment_judge` | `{label, model, says}`: a judge beside the score, never in its place, on a benchmark with no official one. Runs only on `--judge-model`, on the same route; `model` is the one its source used, never a default | | `simulator` | `{model, says, served_as?}`, only with `agent.conversation/v1`: the user's model, on `-simulator`. The conversation opens with a `turn` on an empty transcript, its message after `setup`'s prompt and a blank line. A control never asks it. `cli run --simulator-model` asks another | | `leaderboard` | `{says, simulator?, judge?, bench_options?, repeat?}`: what the upstream's leaderboard fixes besides the ranked model, from its own submission rules - the user simulator's and judge's models, the benchmark's options it sets and the fewest attempts per unit. The builder then offers **Like the leaderboard** | +| `agent_options` | `{option: value}`: what every agent that has the option runs with on this benchmark, as its rules require (`web_tools: off`). A run giving another value is refused; the builder shows it fixed. An agent without the option runs as it is | | `limits.turns` | At most this many agent turns in a conversation (default 20; `cli run --max-turns` forces another) | | `limits.turn_seconds` | The agent's whole work on a unit, every turn of a conversation included (default 900; a task's `agent_seconds`, a setup's own `turn_seconds` or `cli run --timeout agent=` before it) | | `limits.setup_seconds` | How long `setup` may take, in seconds, for a unit an agent runs; every other unit keeps 600; `cli run --timeout setup=` forces either. A driver's own bound still applies | @@ -562,10 +563,10 @@ An agent or a capability may keep several versions in its one file: an older rel | Rule | Detail | | --- | --- | | Shape | A `summary`, `values` (or a `pattern`, with an optional `example`) and a `default`, the vendor's own; the summary says where it comes from | -| Reaches the agent | As `{opt_}` in `model.env`, `env`, or a file `model.files` writes; `cli check` refuses a slot naming no option, and a default the option does not allow | +| Reaches the agent | As `{opt_}` in `model.env`, `env`, or a file `model.files` writes; `writes: {value: text}` puts other text there for a value (`off` as `"WebSearch", "WebFetch"`). `cli check` refuses a slot naming no option, and a default the option does not allow | | Set | `cli run` and `cli conform` take `--option name=value` (repeatable) | | Recorded | Every value under `standard.options` in `config.json`, defaults included | -| Fair by construction | A setting one agent has, every agent whose upstream has it declares under the same name (`reasoning_effort`). `default` leaves it unset where the vendor sends nothing; the relay records the effort each request asked for (`request.reasoning_effort`) | +| Fair by construction | A setting one agent has, every agent whose upstream has it declares under the same name (`reasoning_effort`; `web_tools`, `default` or `off`, for the agent's own web search and fetch). `default` leaves it unset where the vendor sends nothing; the relay records the effort each request asked for (`request.reasoning_effort`) | !!! tip "Write a setting explicitly when an adapter and the CLI would each fill it their own way" Codex's `reasoning_effort` is always written into its `config.toml` as `model_reasoning_effort`, default `medium`. From ddaab4f39710443536bf578f329d7821d6e9c0f5 Mon Sep 17 00:00:00 2001 From: Etienne Filhol Date: Mon, 30 Nov 2026 17:25:19 +0100 Subject: [PATCH 2/2] test(standard): Codex's review line lists its web tools option --- app/tests/test_standard_bench_options.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/tests/test_standard_bench_options.py b/app/tests/test_standard_bench_options.py index 4f24a290f..b6c28605d 100644 --- a/app/tests/test_standard_bench_options.py +++ b/app/tests/test_standard_bench_options.py @@ -523,7 +523,7 @@ def test_a_setting_every_dataset_shares_names_no_dataset(self): def test_an_agent_option_reads_by_its_label_not_its_key(self): self.assertNotIn("reasoning_effort", self.rows()["Options of Codex 2.2.2"]) - self.assertEqual(self.rows()["Options of Codex 2.2.2"], "Reasoning effort medium (its default)") # as the Agent step words it + self.assertEqual(self.rows()["Options of Codex 2.2.2"], "Reasoning effort medium (its default), Web tools default (its default)") # as the Agent step words it def test_a_capability_option_reads_by_its_label_not_its_key(self): out = recipe.compile(dict(GSM8K, benchmark="locomo", datasets=["locomo10"], others=["mem0"], options={}))