From 30e3378397ea3ef4833481f3e977517147d4c05d Mon Sep 17 00:00:00 2001 From: Etienne Filhol Date: Wed, 25 Nov 2026 23:48:53 +0100 Subject: [PATCH 01/15] feat(catalogue): add VitaBench on the standard, and grey out Like the paper when its judge is retired --- .../benchmarks/vitabench/benchmark.json | 76 +++ .../catalogue/benchmarks/vitabench/driver.py | 441 ++++++++++++++++++ .../benchmarks/vitabench/mcp_server.py | 53 +++ .../benchmarks/vitabench/proofs.json | 179 +++++++ .../benchmarks/vitabench/standard.json | 292 ++++++++++++ .../vitabench/upstream-settings.json | 275 +++++++++++ app/nullius/standard/pages/recipe.py | 6 +- app/static/builder/command-builder-core.js | 4 +- app/static/catalogue/marks.svg | 4 + app/tests/test_catalog.py | 2 +- app/tests/test_standard_setups.py | 10 + app/tests/test_standard_vitabench.py | 195 ++++++++ app/ui_tests/test_catalogue_routes.py | 2 +- app/ui_tests/test_command_builder_state.py | 4 +- docs/agents/supported/README.md | 28 +- docs/agents/supported/codex.md | 6 +- docs/agents/supported/digitalmate.md | 6 +- docs/agents/supported/goose.md | 4 +- docs/agents/supported/jiuwenswarm.md | 8 +- docs/agents/supported/mini-swe-agent.md | 4 +- docs/agents/supported/opencode.md | 4 +- docs/agents/supported/swe-agent.md | 4 +- docs/agents/supported/terminus-2.md | 4 +- docs/benchmarks/supported/README.md | 2 + docs/benchmarks/supported/vitabench.md | 83 ++++ docs/standard.md | 2 +- 26 files changed, 1656 insertions(+), 42 deletions(-) create mode 100644 app/nullius/catalogue/benchmarks/vitabench/benchmark.json create mode 100644 app/nullius/catalogue/benchmarks/vitabench/driver.py create mode 100644 app/nullius/catalogue/benchmarks/vitabench/mcp_server.py create mode 100644 app/nullius/catalogue/benchmarks/vitabench/proofs.json create mode 100644 app/nullius/catalogue/benchmarks/vitabench/standard.json create mode 100644 app/nullius/catalogue/benchmarks/vitabench/upstream-settings.json create mode 100644 app/tests/test_standard_vitabench.py create mode 100644 docs/benchmarks/supported/vitabench.md diff --git a/app/nullius/catalogue/benchmarks/vitabench/benchmark.json b/app/nullius/catalogue/benchmarks/vitabench/benchmark.json new file mode 100644 index 000000000..eaaefc12c --- /dev/null +++ b/app/nullius/catalogue/benchmarks/vitabench/benchmark.json @@ -0,0 +1,76 @@ +{ + "key": "vitabench", + "title": "VitaBench", + "category": "Life services", + "domain": "Food delivery, in-store and travel requests from a simulated user, with up to 66 tools.", + "scoring": "Rubric judge", + "harness": [ + "standard" + ], + "origin": "official", + "good_to_know": [ + "The paper's judge, Claude 3.7 Sonnet, is retired, so Like the paper cannot run: choose Any of your choice and a judge model. Scores compare only between runs with the same judge, never with the paper's.", + "Scores depend on the judge's and the simulated user's models: keep both fixed when comparing.", + "The leaderboard's main result is Cross-scenario, in Chinese, with 4 attempts per task.", + "A task passes only when every rubric is met." + ], + "upstream_limitations": [ + "In 15 of the 100 Cross-scenario (English) tasks, the shops, orders or bookings the task relies on are missing, though the Chinese version has them: an agent may fail them through no fault of its own. Score with the Chinese datasets.", + "Its model calls carry configuration fields (base_url, headers, name, max_input_tokens) that OpenAI's API refuses with HTTP 400: run every model of a VitaBench run on OpenRouter (OpenAI's models are there as openai/...) or a custom endpoint.", + "A failed model call makes the upstream start the conversation again, up to 3 times, and each costs its calls.", + "The updated leaderboard does not name its judge model.", + "Its dependencies are not locked to versions." + ], + "limitations": [ + "Another agent replaces the upstream's agent. It gets the upstream's prompt, plus lines from Nullius: where its tools are, and that its last message in a turn goes to the user.", + "With another agent, a judge that fails is the task's error: the upstream's restart of the conversation is not followed.", + "With another agent, one empty final message ends the conversation. The upstream asks its own agent 3 times.", + "There is no reference control: the upstream publishes no reference conversations." + ], + "datasets": [ + { + "key": "vitabench", + "title": "VitaBench", + "tasks": 400, + "official": "https://github.com/meituan-longcat/vitabench", + "verifier": "VitaBench's evaluator: a judge model marks each task's rubrics.", + "source": "GitHub" + } + ], + "timeouts": { + "env_setup": 600, + "agent_setup": 1200, + "agent_run": 7200, + "verify": 3600 + }, + "citation": "@article{he2025vitabench,\n title={VitaBench: Benchmarking LLM Agents with Versatile Interactive Tasks in Real-world Applications}, \n author={He, Wei and Sun, Yueqing and Hao, Hongyan and Hao, Xueyuan and Xia, Zhikang and Gu, Qi and Han, Chengcheng and Zhao, Dengchang and Su, Hui and Zhang, Kefeng and Gao, Man and Su, Xi and Cai, Xiaodong and Cai, Xunliang and Yang, Yu and Zhao, Yunke},\n journal={arXiv preprint arXiv:2509.26490},\n year={2025}\n}", + "citation_source": "https://github.com/meituan-longcat/vitabench", + "evidence": [ + { + "label": "Rubrics met", + "path": "rubrics" + }, + { + "label": "Rubric missed", + "path": "rubrics_missed" + }, + { + "label": "Ended by", + "path": "termination", + "values": { + "user_stop": "User", + "agent_stop": "Agent", + "max_steps": "Step limit", + "too_many_errors": "Too many errors", + "invalid_agent_message": "Empty agent message" + } + }, + { + "label": "Tool errors", + "path": "tool_errors", + "unless": [ + "0" + ] + } + ] +} diff --git a/app/nullius/catalogue/benchmarks/vitabench/driver.py b/app/nullius/catalogue/benchmarks/vitabench/driver.py new file mode 100644 index 000000000..5400cc925 --- /dev/null +++ b/app/nullius/catalogue/benchmarks/vitabench/driver.py @@ -0,0 +1,441 @@ +"""VitaBench's driver for the Nullius standard (JSON lines on stdin and stdout). + +Everything the benchmark's authors decide is their code, ``vitabench`` at the commit +``standard.json`` pins, installed as this driver's environment and imported: + +units - the dataset file's tasks, through the upstream's ``Task`` model +setup - the upstream agent's own prompt (``LLMAgent.system_prompt``) and its + environment's tools, served by ``mcp_server.py``, which passes each call here +turn - the upstream's ``run_task`` in a thread: its Orchestrator, user simulator, + limits, retries and evaluator. The agent in it is ``AcpAgent``: a tool call made + over MCP is the agent's next message, which the Orchestrator executes; the final + text of a turn is its next message to the user. ``turn`` answers ``done`` once + the agent or the user says the upstream's stop token, or the Orchestrator ends it +answer - the original: the upstream's own agent as the run's model, in the same run_task +score - the ``SimulationRun`` run_task returned, scored by the upstream's evaluator + +The run's three models are entries of the upstream's own model configuration +(``vita.config.models``): its ``default`` entry with the route's address and model. + +Glue that shows in a result: the lines that tell the ACP agent where its tools are; an +empty final message, which the upstream would ask its model for again twice, counts as +three empty ones (``invalid_agent_message``); and a conversation started again by run_task +is told by ``restart``, except after it ended: an evaluator that raises is then the +unit's error, the ACP agent being gone. +""" +import contextlib +import json +import os +import queue +import random +import shutil +import socket +import sys +import tempfile +import threading +import uuid + +PROTOCOL, sys.stdout = sys.stdout, sys.stderr # stdout is the protocol's: whatever the upstream prints goes to the log +from loguru import logger + +logger.remove() +logger.add(sys.stderr, level="INFO") + +from vita import config +from vita.agent.llm_agent import LLMAgent +from vita.data_model.message import AssistantMessage, MultiToolMessage, ToolCall, ToolMessage, UserMessage +from vita.data_model.simulation import SimulationRun, TerminationReason +from vita.data_model.tasks import Task +from vita.environment.environment import get_cross_environment +from vita.evaluator.evaluator import evaluate_simulation +from vita.orchestrator.orchestrator import get_default_first_agent_message +from vita.registry import registry +from vita.run import _clear_global_state, run_task +from vita.user.user_simulator import DummyUser, UserSimulator +from vita.utils.utils import get_now + +from nullius.standard.protocols.jsonl import serve + +DOMAINS = {"cross": "delivery,instore,ota"} # the upstream CLI's own default domain +HOW = {"english": """ + +How this session works: the tools of the MCP server named vita, given to this session, are your tools. \ +Your final message in each turn is sent to the user, and their reply comes as your next message. + +You said to the user: {greeting} +The user says:""", + "chinese": """ + +本次会话的方式:本会话提供的名为 vita 的 MCP 服务器中的工具就是你的工具。你每一轮的最后一条消息会发送给用户,用户的回复会作为你的下一条消息。 + +你对用户说:{greeting} +用户说:"""} +ENDED_CALL = "Error: the conversation has ended ({why}); this call was not made." +RESTARTED_CALL = "Error: the conversation was started again; this call was not made." +WAIT = 590 # under the 600 s a turn's answer is given +STATE, _TASKS = {}, {} +_CURRENT = [None] # the conversation running: a driver holds one unit at a time + + +class Aborted(BaseException): + """The run cannot go on. Not an ``Exception``: run_task retries those.""" + + +class AcpAgent(LLMAgent): + """The ACP agent as the upstream's Orchestrator sees an agent.""" + + def __init__(self, **kw): + super().__init__(**kw) + self.c = _CURRENT[0] + self.attempt = self.c.new_attempt() + self.empty = None # the message the ACP agent answered with nothing + + def get_init_state(self, message_history=None): + return None + + def generate_next_message(self, message, state): + c = self.c + if self.empty is message: # the Orchestrator asks again: the turn is over, there is no other answer + return AssistantMessage(role="assistant", content="", cost=0.0), state + if isinstance(message, (ToolMessage, MultiToolMessage)): + for m in (message.tool_messages if isinstance(message, MultiToolMessage) else [message]): + c.answer(m.id, m.content or "", bool(m.error)) + elif isinstance(message, UserMessage): + c.out.put(("say", message.content, self.attempt)) + while True: + what, value, attempt = c.inbox.get() + if what == "abort": + raise Aborted("the unit was left before the conversation ended") + if attempt == self.attempt: + break + if what == "call": # from an attempt before: not made + value[2](RESTARTED_CALL, True) + if what == "call": + name, arguments, reply = value + tc = ToolCall(id="call_" + uuid.uuid4().hex[:16], name=str(name), + arguments=arguments if isinstance(arguments, dict) else {}, requestor="assistant") + c.pending[tc.id] = reply + return AssistantMessage(role="assistant", content=None, tool_calls=[tc], cost=0.0), state + said = AssistantMessage(role="assistant", content=value, cost=0.0) + if not said.has_text_content(): + self.empty = message + elif self.is_stop(said): + c.closing(TerminationReason.AGENT_STOP) + return said, state + + +class _Heard: + """The upstream's user, its stop heard: the judge may take long, and the ACP agent need not wait for it.""" + + def generate_next_message(self, message, state): + said, state = super().generate_next_message(message, state) + if said.has_text_content() and self.is_stop(said): + _CURRENT[0].closing(TerminationReason.USER_STOP) + return said, state + + +class HeardUser(_Heard, UserSimulator): + pass + + +class HeardDummyUser(_Heard, DummyUser): + pass + + +registry.register_agent(AcpAgent, "nullius_acp") +registry.register_user(HeardUser, "heard_user_simulator") +registry.register_user(HeardDummyUser, "heard_dummy_user") + + +class Conversation: + """One unit's conversation: the upstream's run_task in a thread, the socket + the MCP server passes calls through, and the queues between them.""" + + def __init__(self, tools): + self.tools = tools + self.inbox = queue.Queue() # to AcpAgent: ("call", (name, arguments, reply), attempt), ("said", text, attempt), ("abort", ..) + self.out = queue.Queue() # to a turn: ("say", text, attempt), ("done", None, None) + self.pending = {} # tool call id -> its reply + self.attempt = 0 # run_task's attempt running (1, 2, ...) + self.given = 0 # the attempt the ACP agent was last given a message of + self.lock = threading.Lock() + self.over = self.result = self.error = self.thread = None + self.dir = tempfile.mkdtemp(prefix="nullius-vita-") + os.chmod(self.dir, 0o700) + self.at = os.path.join(self.dir, "s") + self.sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) + self.sock.bind(self.at) + self.sock.listen(16) + threading.Thread(target=self._accept, daemon=True).start() + + def _accept(self): + while True: + try: + conn, _ = self.sock.accept() + except OSError: + return + threading.Thread(target=self._call, args=(conn,), daemon=True).start() + + def _call(self, conn): + try: + f = conn.makefile("rwb") + req = json.loads(f.readline() or b"{}") + except (OSError, ValueError): + conn.close() + return + + def send(reply): + with contextlib.suppress(OSError): + f.write((json.dumps(reply) + "\n").encode()) + f.flush() + with contextlib.suppress(OSError): + conn.close() + + def reply(text, error): + send({"text": text, "isError": error}) + + if req.get("list"): + send({"tools": self.tools}) + return + with self.lock: + if self.over is None and self.thread is not None and self.given == self.attempt: + self.inbox.put(("call", (req.get("name"), req.get("arguments"), reply), self.given)) + return + why = self.over or (None if self.thread is not None else "not started") + reply(RESTARTED_CALL if why is None else ENDED_CALL.format(why=why), True) + + def new_attempt(self): + with self.lock: + if self.over is not None: + raise Aborted("the upstream's evaluator raised (the driver's log says why)") + self.attempt += 1 + left = list(self.pending.values()) + self.pending.clear() + for reply in left: + reply(RESTARTED_CALL, True) + return self.attempt + + def answer(self, call_id, text, error): + reply = self.pending.pop(call_id, None) + if reply is not None: + reply(text, error) + + def closing(self, why): + """The conversation is over: calls still waiting are answered, never made.""" + with self.lock: + self.over = self.over or getattr(why, "value", why) + left = list(self.pending.values()) + self.pending.clear() + with contextlib.suppress(queue.Empty): + while True: + what, value, _ = self.inbox.get_nowait() + if what == "call": + left.append(value[2]) + for reply in left: + reply(ENDED_CALL.format(why=self.over), True) + self.out.put(("done", None, None)) + + def start(self, **kw): + self.thread = threading.Thread(target=self._run, kwargs=kw, daemon=True) + self.thread.start() + + def _run(self, **kw): + try: + self.result = run_task(**kw) + except BaseException as e: + self.error = e + self.closing(self.result.termination_reason if self.result is not None else "stopped") + + def said(self, text): + with self.lock: + if self.given == self.attempt: + self.inbox.put(("said", text, self.given)) + + def next(self): + """What the user says next - in a new attempt, with ``restart`` - or done.""" + try: + what, value, attempt = self.out.get(timeout=WAIT) + except queue.Empty: + raise TimeoutError(f"the conversation did not answer in {WAIT} s") + if what == "done": + return {"done": True} + with self.lock: + again, self.given = self.given not in (0, attempt), attempt + return {"message": value, "restart": True} if again else {"message": value} + + def close(self): + if self.thread is not None and self.thread.is_alive(): + self.inbox.put(("abort", None, None)) + self.thread.join(timeout=10) + with contextlib.suppress(OSError): + self.sock.close() + shutil.rmtree(self.dir, ignore_errors=True) + + +def option(name, default): + return os.environ.get("NULLIUS_OPTION_" + name.upper()) or default + + +def dataset(): + """(the upstream's --domain, its --language).""" + ds = os.environ.get("NULLIUS_DATASET_ID") or "" + name = ds.removesuffix("-en") + return DOMAINS.get(name, name), "english" if ds.endswith("-en") else "chinese" + + +def tasks(): + if not _TASKS: + with open(os.environ["NULLIUS_DATASET"], encoding="utf-8") as f: + _TASKS.update((str(t["id"]), Task.model_validate(t)) for t in json.load(f)) + return _TASKS + + +def task(unit): + if unit not in tasks(): + raise ValueError(f"no task {unit!r} in {os.environ.get('NULLIUS_DATASET_ID')}") + return tasks()[unit] + + +def environment(t): + """The task's environment, built as the upstream's runner builds it (_run_task_internal).""" + domain, language = dataset() + _clear_global_state() + if "," in domain: + return get_cross_environment(domain, t.environment, language) + return registry.get_env_constructor(domain)(t.environment, language) + + +def use(role, r, **settings): + """A route as an entry of the upstream's model configuration, over its ``default``; its name there.""" + config.models[role] = config._deep_merge_dict(config.models["default"], { + "name": role, "model": r["model"], "base_url": r["base_url"].rstrip("/") + "/chat/completions", + "headers": {"Authorization": "Bearer " + r["key"]}, **settings}) + return role + + +def run_args(t, agent, simulator, judge, attempt, user_prefix=""): + """run_task's arguments. The seed is the one the upstream's run_tasks draws for the trial.""" + if not simulator: + raise ValueError("the user is played by a model, and none was given") + if not judge: + raise ValueError("the rubrics are graded by a judge model, and none was given") + domain, language = dataset() + r = random.Random(config.DEFAULT_SEED) + seed = [r.randint(0, 1000000) for _ in range(int(attempt or 1))][-1] + return dict(domain=domain, task=t, agent=agent, user=user_prefix + option("user", config.DEFAULT_USER_IMPLEMENTATION), + llm_user=use("nullius-user", simulator), llm_args_user={}, llm_evaluator=use("nullius-judge", judge), llm_args_evaluator={}, + max_steps=int(option("max_steps", config.DEFAULT_MAX_STEPS)), max_errors=int(option("max_errors", config.DEFAULT_MAX_ERRORS)), + evaluation_type=option("evaluation", config.DEFAULT_EVALUATION_TYPE), seed=seed, language=language) + + +def _state(unit): + if unit not in STATE: + raise ValueError(f"{unit} was not set up") + return STATE[unit] + + +def _leave(): + for st in STATE.values(): + if st.get("conversation") is not None: + st["conversation"].close() + STATE.clear() + _CURRENT[0] = None + + +def units(dataset, setup=None): + return {"units": list(tasks())} + + +def setup(unit, dir, attempt=None): + t = task(unit) + _leave() + env, language = environment(t), dataset()[1] + agent = LLMAgent(tools=env.get_tools(), domain_policy=env.get_policy(), time=env.tools.db.time, language=language) + c = Conversation([{"name": f["name"], "description": f["description"], "inputSchema": f["parameters"]} + for f in (x.openai_schema["function"] for x in env.get_tools())]) + STATE[unit] = {"conversation": c, "judge": None} + _CURRENT[0] = c + greeting = get_default_first_agent_message(language).content + return {"prompt": agent.system_prompt + HOW[language].format(greeting=greeting), + "mcp": [{"name": "vita", "server": "vita", "env": {"VITA_AT": c.at}}]} + + +def turn(unit, dir, transcript, simulator=None, judge=None, attempt=None): + st, t = _state(unit), task(unit) + c = st["conversation"] + if not transcript: + args = run_args(t, "nullius_acp", simulator, judge, attempt, "heard_") + st.update(judge=judge["model"], args=args) + c.start(llm_agent="nullius-acp", llm_args_agent={}, **args) + return c.next() + if c.thread is None: + raise ValueError("the conversation was not started: the first turn has an empty transcript") + if c.over is not None: + return {"done": True} + c.said((transcript[-1].get("text") or "") if transcript[-1].get("role") == "agent" else "") + return c.next() + + +def answer(unit, dir, setup, model, base_url, key, simulator=None, judge=None, attempt=None): + """The original: the upstream's own agent as ``model``, its --agent, --enable-think and model settings the run's options.""" + if setup != "original": + raise ValueError(f"VitaBench has no {setup} setup") + t = task(unit) + _leave() + args = run_args(t, option("upstream_agent", config.DEFAULT_AGENT_IMPLEMENTATION), simulator, judge, attempt) + think = option("enable_think", "off") == "on" + settings = {"temperature": float(option("agent_temperature", config.models["default"]["temperature"]))} + if option("agent_max_tokens", "default") != "default": + settings["max_tokens"] = int(option("agent_max_tokens", "")) + if think and option("agent_reasoning_effort", "default") != "default": + settings["reasoning_effort"] = option("agent_reasoning_effort", "") + agent = use("nullius-agent", {"model": model, "base_url": base_url, "key": key}, **settings) + run = run_task(llm_agent=agent, llm_args_agent={}, enable_think=think, **args) + STATE[unit] = {"conversation": None, "original": run, "judge": judge["model"], "args": args} + said = [m.content for m in run.messages if m.role == "assistant" and m.content] + return {"answer": said[-1] if said else ""} + + +def score(unit, dir, transcript, answer, judge=None, setup=None): + st, t = _state(unit), task(unit) + c = st["conversation"] + if c is None: + run = st["original"] + elif c.thread is None: # the null control: no message, as the upstream scores one + now = get_now() + run = SimulationRun(id=str(uuid.uuid4()), task_id=t.id, start_time=now, end_time=now, duration=0.0, + termination_reason=TerminationReason.INVALID_AGENT_MESSAGE, messages=[]) + domain, language = dataset() + run.reward_info = evaluate_simulation(run, t, config.DEFAULT_EVALUATION_TYPE, domain, language=language) + else: + if c.over is None: + raise ValueError("the conversation has not ended: the run's turns ran out before the upstream's limits") + c.thread.join() # the upstream's evaluator + if c.result is None: + raise ValueError(f"the upstream's run raised {type(c.error).__name__}: {c.error}") + run = c.result + info = run.reward_info + calls = [m for m in run.messages if isinstance(m, ToolMessage)] + detail = {"domain": dataset()[0], "language": dataset()[1], "termination": getattr(run.termination_reason, "value", run.termination_reason), + "tool_calls": len(calls), "tool_errors": sum(1 for m in calls if m.error), + "user_turns": sum(1 for m in run.messages if m.role == "user"), + "reward_info": info.model_dump(mode="json", exclude_none=True, exclude={"window_evaluations"})} + if info.nl_rubrics: + detail["rubrics"] = f"{sum(1 for r in info.nl_rubrics if r.met)}/{len(info.nl_rubrics)}" + detail["rubrics_missed"] = {r.nl_rubric or "": r.justification for r in info.nl_rubrics if not r.met} + if st.get("args"): + a = st["args"] + detail.update(judge=st["judge"], seed=a["seed"], max_steps=a["max_steps"], max_errors=a["max_errors"], evaluation=a["evaluation_type"], user=a["user"].removeprefix("heard_"), + **({"attempts": c.attempt} if c is not None else {"agent": option("upstream_agent", config.DEFAULT_AGENT_IMPLEMENTATION)})) + out = os.path.join(os.path.dirname(os.path.abspath(dir)), "verifier") + with contextlib.suppress(OSError): + os.makedirs(out, exist_ok=True) + with open(os.path.join(out, "simulation.json"), "w", encoding="utf-8") as f: + f.write(run.model_dump_json(indent=2)) + if c is not None: + c.close() + return {"reward": info.reward, "passed": info.reward == 1.0, "detail": detail} + + +if __name__ == "__main__": + serve({"units": units, "setup": setup, "turn": turn, "answer": answer, "score": score}, out=PROTOCOL) diff --git a/app/nullius/catalogue/benchmarks/vitabench/mcp_server.py b/app/nullius/catalogue/benchmarks/vitabench/mcp_server.py new file mode 100644 index 000000000..c4edbc84b --- /dev/null +++ b/app/nullius/catalogue/benchmarks/vitabench/mcp_server.py @@ -0,0 +1,53 @@ +"""VitaBench's tools as a stdio MCP server. It executes nothing: the list of tools +(the upstream's own schemas) and each call go to the driver over the unit's socket +(``VITA_AT``), where the upstream's Orchestrator executes the call in its own +environment. Each request is one connection, a JSON line each way. A call is never +refused before the upstream sees it.""" +import json +import os +import socket + +import anyio +import mcp.types as types +from mcp.server.lowlevel import Server +from mcp.server.stdio import stdio_server + + +def ask(request): + with socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) as s: + s.connect(os.environ["VITA_AT"]) + f = s.makefile("rwb") + f.write((json.dumps(request) + "\n").encode()) + f.flush() + return json.loads(f.readline() or b"{}") + + +def call(name, arguments): + try: + got = ask({"name": name, "arguments": arguments}) + return str(got["text"]), bool(got["isError"]) + except (OSError, ValueError, KeyError) as e: + return f"Error: the benchmark could not be reached ({e})", True + + +def main(): + server = Server("vita") + + @server.list_tools() + async def list_tools(): + return [types.Tool(**t) for t in (await anyio.to_thread.run_sync(ask, {"list": True}))["tools"]] + + @server.call_tool(validate_input=False) + async def call_tool(name, arguments): + text, error = await anyio.to_thread.run_sync(call, name, {} if arguments is None else arguments) + return types.CallToolResult(content=[types.TextContent(type="text", text=text)], isError=error) + + async def serve(): + async with stdio_server() as (read, write): + await server.run(read, write, server.create_initialization_options()) + + anyio.run(serve) + + +if __name__ == "__main__": + main() diff --git a/app/nullius/catalogue/benchmarks/vitabench/proofs.json b/app/nullius/catalogue/benchmarks/vitabench/proofs.json new file mode 100644 index 000000000..d7640c339 --- /dev/null +++ b/app/nullius/catalogue/benchmarks/vitabench/proofs.json @@ -0,0 +1,179 @@ +{ + "schema": "nullius.proofs/v1", + "kind": "benchmark", + "key": "vitabench", + "versions": { + "": { + "proven": { + "cross": { + "units": { + "units": 100, + "passed": "100 ids, the same twice, unique" + }, + "nop": { + "passed": "0/100", + "value": 0.0, + "expect": { + "at_most": 0.0 + }, + "units": 100, + "options": { + "evaluation": "trajectory", + "user": "user_simulator", + "max_steps": "300", + "max_errors": "10" + }, + "judge": "meta/muse-spark-1.3-contributor" + } + }, + "delivery": { + "units": { + "units": 100, + "passed": "100 ids, the same twice, unique" + }, + "nop": { + "passed": "0/100", + "value": 0.0, + "expect": { + "at_most": 0.0 + }, + "units": 100, + "options": { + "evaluation": "trajectory", + "user": "user_simulator", + "max_steps": "300", + "max_errors": "10" + }, + "judge": "meta/muse-spark-1.3-contributor" + } + }, + "instore": { + "units": { + "units": 100, + "passed": "100 ids, the same twice, unique" + }, + "nop": { + "passed": "0/100", + "value": 0.0, + "expect": { + "at_most": 0.0 + }, + "units": 100, + "options": { + "evaluation": "trajectory", + "user": "user_simulator", + "max_steps": "300", + "max_errors": "10" + }, + "judge": "meta/muse-spark-1.3-contributor" + } + }, + "ota": { + "units": { + "units": 100, + "passed": "100 ids, the same twice, unique" + }, + "nop": { + "passed": "0/100", + "value": 0.0, + "expect": { + "at_most": 0.0 + }, + "units": 100, + "options": { + "evaluation": "trajectory", + "user": "user_simulator", + "max_steps": "300", + "max_errors": "10" + }, + "judge": "meta/muse-spark-1.3-contributor" + } + }, + "cross-en": { + "units": { + "units": 100, + "passed": "100 ids, the same twice, unique" + }, + "nop": { + "passed": "0/100", + "value": 0.0, + "expect": { + "at_most": 0.0 + }, + "units": 100, + "options": { + "evaluation": "trajectory", + "user": "user_simulator", + "max_steps": "300", + "max_errors": "10" + }, + "judge": "meta/muse-spark-1.3-contributor" + } + }, + "delivery-en": { + "units": { + "units": 100, + "passed": "100 ids, the same twice, unique" + }, + "nop": { + "passed": "0/100", + "value": 0.0, + "expect": { + "at_most": 0.0 + }, + "units": 100, + "options": { + "evaluation": "trajectory", + "user": "user_simulator", + "max_steps": "300", + "max_errors": "10" + }, + "judge": "meta/muse-spark-1.3-contributor" + } + }, + "instore-en": { + "units": { + "units": 100, + "passed": "100 ids, the same twice, unique" + }, + "nop": { + "passed": "0/100", + "value": 0.0, + "expect": { + "at_most": 0.0 + }, + "units": 100, + "options": { + "evaluation": "trajectory", + "user": "user_simulator", + "max_steps": "300", + "max_errors": "10" + }, + "judge": "meta/muse-spark-1.3-contributor" + } + }, + "ota-en": { + "units": { + "units": 100, + "passed": "100 ids, the same twice, unique" + }, + "nop": { + "passed": "0/100", + "value": 0.0, + "expect": { + "at_most": 0.0 + }, + "units": 100, + "options": { + "evaluation": "trajectory", + "user": "user_simulator", + "max_steps": "300", + "max_errors": "10" + }, + "judge": "meta/muse-spark-1.3-contributor" + } + } + } + } + } +} diff --git a/app/nullius/catalogue/benchmarks/vitabench/standard.json b/app/nullius/catalogue/benchmarks/vitabench/standard.json new file mode 100644 index 000000000..f375ae38b --- /dev/null +++ b/app/nullius/catalogue/benchmarks/vitabench/standard.json @@ -0,0 +1,292 @@ +{ + "schema": "nullius.benchmark/v1", + "key": "vitabench", + "label": "VitaBench", + "summary": "Each task is a user's request to a life-service agent (food delivery, in-store services, travel), held by the upstream's own runner: a simulated user talks, the agent answers through the domain's tools, and a judge checks the conversation against the task's rubrics.", + "family": "agent", + "needs": [ + "agent.tools/v1", + "agent.conversation/v1" + ], + "upstream": { + "repository": "https://github.com/meituan-longcat/vitabench", + "tested": "742e240855bf8686a0842360749d5ea970ea3987", + "tested_date": "2026-11-25", + "license": "MIT" + }, + "driver": { + "command": [ + "{install}/.venv/bin/python", + "{here}/driver.py" + ], + "install": { + "python": "3.12", + "project": ".", + "pip": [ + "mcp==1.30.0" + ] + } + }, + "mcp_servers": { + "vita": { + "command": [ + "{install}/.venv/bin/python", + "{here}/mcp_server.py" + ], + "summary": "The task's tools: the upstream's own schemas; each call is executed by the upstream's Orchestrator." + } + }, + "datasets": [ + { + "id": "cross", + "label": "Cross-scenario", + "path": "data/vita/domains/cross_domain/tasks.json", + "sha256": "a7e782785f40667511a54562d613e2122de645a36b8661a5658c1740d34a5815", + "units": 100 + }, + { + "id": "delivery", + "label": "Delivery", + "path": "data/vita/domains/delivery/tasks.json", + "sha256": "22746ae23eb6dbed2ee6a5e3a0f476af60e8a43bab0ea2d3ead54f0ef3829f94", + "units": 100 + }, + { + "id": "instore", + "label": "In-store", + "path": "data/vita/domains/instore/tasks.json", + "sha256": "f92b9313e5476499d51b73a929cc901b7d87cd7c3315df56942d62c83aa34407", + "units": 100 + }, + { + "id": "ota", + "label": "OTA", + "path": "data/vita/domains/ota/tasks.json", + "sha256": "c9208c25accef24f4798bbd3f38403da081fdf48f3c7100dfc702aa7b379559e", + "units": 100 + }, + { + "id": "cross-en", + "label": "Cross-scenario (English)", + "path": "data/vita/domains/cross_domain/tasks_en.json", + "sha256": "54a396cd2e5de2a26da29b954341ad190806ed7f2e870dd96511e81a947c2865", + "units": 100 + }, + { + "id": "delivery-en", + "label": "Delivery (English)", + "path": "data/vita/domains/delivery/tasks_en.json", + "sha256": "4906517e50ad578cdfd52426b76e4604bfd207db4254643bbc150891240f5500", + "units": 100 + }, + { + "id": "instore-en", + "label": "In-store (English)", + "path": "data/vita/domains/instore/tasks_en.json", + "sha256": "8e3ac7b53501d211a5261ef4e8ad9eb46bd304bd6a77794dea860f107aebaa95", + "units": 100 + }, + { + "id": "ota-en", + "label": "OTA (English)", + "path": "data/vita/domains/ota/tasks_en.json", + "sha256": "f04ac51d84452557f4a68b6cc25f854edc88b0a501c85e48943859be7ab203b9", + "units": 100 + } + ], + "units": { + "noun": "task", + "nouns": "tasks" + }, + "simulator": { + "model": "gpt-4.1-2025-04-14", + "says": "the user: the upstream's own user simulator, with the paper's model, at temperature 0" + }, + "controls": { + "nop": { + "source": "nullius", + "from": "Nullius: no agent runs; the upstream's evaluator scores a run ended by an invalid agent message, without asking the judge." + } + }, + "score": { + "kind": "pass", + "says": "the upstream's evaluator: the judge reads the conversation in sliding windows of 10 messages, 2 of them overlapping, and marks each rubric; the task passes when every rubric is met. A conversation that reaches the step or error limit, or ends on an empty agent message, scores 0 without the judge.", + "judge": { + "model": "claude-3.7-sonnet", + "says": "the paper's evaluator, at temperature 0 and without thinking; the updated leaderboard does not name its evaluator" + } + }, + "limits": { + "turn_seconds": 7200, + "turns": 160, + "score_seconds": 3600, + "attempts": "Attempt N is the upstream's trial N-1: its recorded seed is the one run_tasks draws for it from 300. The upstream sends no seed to a model." + }, + "setups": { + "original": { + "summary": "The upstream's own agent (LLMAgent) as the run's model, in the upstream's own runner, user simulator and evaluator.", + "providers": { + "openrouter": "", + "custom": "" + }, + "comparable": [], + "turn_seconds": 7200, + "paper": "the VitaBench paper (arXiv 2509.26490)", + "reference_agent": "VitaBench LLM agent" + } + }, + "options": { + "evaluation": { + "summary": "How the judge reads the conversation.", + "setups": [ + "original", + "yours" + ], + "default": "trajectory", + "values": [ + "trajectory", + "trajectory_full_traj_rubric", + "trajectory_sliding_wo_rubric", + "trajectory_full_traj_wo_rubric" + ], + "names": { + "trajectory": "Sliding window, rubrics", + "trajectory_full_traj_rubric": "Whole conversation, rubrics", + "trajectory_sliding_wo_rubric": "Sliding window, no rubrics", + "trajectory_full_traj_wo_rubric": "Whole conversation, no rubrics" + }, + "about": { + "trajectory": "The upstream's default, the leaderboard's.", + "trajectory_full_traj_rubric": "The paper's ablation: every rubric in one judge call.", + "trajectory_sliding_wo_rubric": "The paper's ablation: the judge sees no rubrics.", + "trajectory_full_traj_wo_rubric": "The paper's ablation: one judge call without rubrics." + } + }, + "user": { + "label": "Simulated user", + "summary": "How the simulated user tells what it wants.", + "setups": [ + "original", + "yours" + ], + "default": "user_simulator", + "values": [ + "user_simulator", + "dummy_user" + ], + "names": { + "user_simulator": "Step by step", + "dummy_user": "All at once" + }, + "about": { + "user_simulator": "The upstream's default: reveals its requests over the conversation.", + "dummy_user": "The upstream's dummy_user: states every request in its first message, for the solo agent." + } + }, + "max_steps": { + "label": "Steps per conversation", + "summary": "The most messages and tool rounds of a conversation.", + "setups": [ + "original", + "yours" + ], + "default": "300", + "pattern": "[1-9][0-9]?|[12][0-9]{2}|300", + "example": "100", + "limit": true + }, + "max_errors": { + "label": "Tool errors per conversation", + "summary": "The most tool calls that fail before a conversation ends.", + "setups": [ + "original", + "yours" + ], + "default": "10", + "pattern": "[1-9][0-9]{0,3}", + "example": "5", + "limit": true + }, + "upstream_agent": { + "label": "Agent variant", + "summary": "Whether the benchmark's own agent talks with the user or works alone.", + "setups": [ + "original" + ], + "default": "llm_agent", + "values": [ + "llm_agent", + "llm_solo_agent" + ], + "names": { + "llm_agent": "Conversation", + "llm_solo_agent": "Solo" + }, + "about": { + "llm_agent": "The upstream's LLMAgent, the leaderboard's.", + "llm_solo_agent": "The paper's solo ablation: use it with the simulated user All at once. Its prompt is Chinese on every dataset." + } + }, + "enable_think": { + "label": "Thinking", + "summary": "Whether the benchmark's own agent model thinks (the upstream's --enable-think).", + "names": { + "off": "Off", + "on": "On" + }, + "setups": [ + "original" + ], + "default": "off", + "values": [ + "off", + "on" + ], + "about": { + "off": "The upstream's default: no reasoning effort sent, Claude's thinking disabled.", + "on": "Sends the reasoning effort below; Claude and DeepSeek replies keep their reasoning." + } + }, + "agent_reasoning_effort": { + "summary": "How much reasoning the benchmark's own agent model uses.", + "setups": [ + "original" + ], + "default": "default", + "values": [ + "default", + "minimal", + "low", + "medium", + "high", + "xhigh" + ], + "when": { + "enable_think": [ + "on" + ] + }, + "about": { + "default": "None sent: the provider's own." + } + }, + "agent_temperature": { + "summary": "The temperature of the benchmark's own agent model, the paper's 0 by default.", + "setups": [ + "original" + ], + "default": "0.0", + "pattern": "[0-9]+(\\.[0-9]+)?", + "example": "0.7" + }, + "agent_max_tokens": { + "summary": "The longest reply of the benchmark's own agent model. The default sends no limit.", + "setups": [ + "original" + ], + "default": "default", + "pattern": "default|[1-9][0-9]{0,6}", + "example": "8192" + } + } +} diff --git a/app/nullius/catalogue/benchmarks/vitabench/upstream-settings.json b/app/nullius/catalogue/benchmarks/vitabench/upstream-settings.json new file mode 100644 index 000000000..b1def4b4f --- /dev/null +++ b/app/nullius/catalogue/benchmarks/vitabench/upstream-settings.json @@ -0,0 +1,275 @@ +[ + { + "entry": "vita run (src/vita/cli.py)", + "setting": "--domain delivery,instore,ota", + "values": "domains, joined by commas to merge them", + "default": "delivery,instore,ota", + "nullius": "dataset:cross" + }, + { + "entry": "vita run (src/vita/cli.py)", + "setting": "--domain delivery", + "values": "a registered domain", + "default": "delivery,instore,ota", + "nullius": "dataset:delivery" + }, + { + "entry": "vita run (src/vita/cli.py)", + "setting": "--domain instore", + "values": "a registered domain", + "default": "delivery,instore,ota", + "nullius": "dataset:instore" + }, + { + "entry": "vita run (src/vita/cli.py)", + "setting": "--domain ota", + "values": "a registered domain", + "default": "delivery,instore,ota", + "nullius": "dataset:ota" + }, + { + "entry": "vita run (src/vita/cli.py)", + "setting": "--language english, domain cross", + "values": "chinese, english", + "default": "chinese", + "nullius": "dataset:cross-en" + }, + { + "entry": "vita run (src/vita/cli.py)", + "setting": "--language english, domain delivery", + "values": "chinese, english", + "default": "chinese", + "nullius": "dataset:delivery-en" + }, + { + "entry": "vita run (src/vita/cli.py)", + "setting": "--language english, domain instore", + "values": "chinese, english", + "default": "chinese", + "nullius": "dataset:instore-en" + }, + { + "entry": "vita run (src/vita/cli.py)", + "setting": "--language english, domain ota", + "values": "chinese, english", + "default": "chinese", + "nullius": "dataset:ota-en" + }, + { + "entry": "vita run (src/vita/cli.py)", + "setting": "--domain, another combination of domains", + "values": "any two domains", + "default": "delivery,instore,ota", + "nullius": "not offered - the cross-scenario tasks are written for all three domains, which the paper runs" + }, + { + "entry": "vita run (src/vita/cli.py)", + "setting": "--task-set-name", + "values": "a registered task set", + "default": "the domain's", + "nullius": "fixed:the domain's - the upstream's default" + }, + { + "entry": "vita run (src/vita/cli.py)", + "setting": "--task-ids, --num-tasks", + "values": "ids, a number", + "default": "every task", + "nullius": "fixed:every task - a run's units and limit choose fewer" + }, + { + "entry": "vita run (src/vita/cli.py)", + "setting": "--num-trials", + "values": "an integer from 1", + "default": "1", + "nullius": "fixed:1 trial per attempt - a run's --attempts K runs each task K times" + }, + { + "entry": "vita run (src/vita/cli.py)", + "setting": "--agent", + "values": "llm_agent, llm_solo_agent", + "default": "llm_agent", + "nullius": "option:upstream_agent" + }, + { + "entry": "vita run (src/vita/cli.py)", + "setting": "--agent-llm", + "values": "a model of models.yaml", + "default": "gpt-4.1", + "nullius": "setup:original" + }, + { + "entry": "vita run (src/vita/cli.py)", + "setting": "--agent-llm-args, --user-llm-args, --evaluator-llm-args", + "values": "a dict", + "default": "the model's entry of models.yaml", + "nullius": "not offered - the CLI cannot parse a dict, and models.yaml's entry overrides them in generate" + }, + { + "entry": "vita run (src/vita/cli.py)", + "setting": "--user", + "values": "user_simulator, dummy_user", + "default": "user_simulator", + "nullius": "option:user" + }, + { + "entry": "vita run (src/vita/cli.py)", + "setting": "--user-llm", + "values": "a model of models.yaml", + "default": "gpt-4.1", + "nullius": "fixed:gpt-4.1-2025-04-14 - the paper's; a run's simulator model replaces it" + }, + { + "entry": "vita run (src/vita/cli.py)", + "setting": "--evaluator-llm", + "values": "a model of models.yaml", + "default": "anthropic.claude-3.7-sonnet", + "nullius": "fixed:claude-3.7-sonnet - the upstream's default; a run's judge model replaces it" + }, + { + "entry": "vita run (src/vita/cli.py)", + "setting": "--evaluation-type", + "values": "trajectory, trajectory_full_traj_rubric, trajectory_sliding_wo_rubric, trajectory_full_traj_wo_rubric", + "default": "trajectory", + "nullius": "option:evaluation" + }, + { + "entry": "vita run (src/vita/cli.py)", + "setting": "--enable-think", + "values": "a flag", + "default": "off", + "nullius": "option:enable_think" + }, + { + "entry": "vita run (src/vita/cli.py)", + "setting": "--max-steps", + "values": "an integer", + "default": "300", + "nullius": "option:max_steps" + }, + { + "entry": "vita run (src/vita/cli.py)", + "setting": "--max-errors", + "values": "an integer", + "default": "10", + "nullius": "option:max_errors" + }, + { + "entry": "vita run (src/vita/cli.py)", + "setting": "--seed", + "values": "an integer", + "default": "300", + "nullius": "fixed:300 - the upstream's default; it is recorded and sent to no model" + }, + { + "entry": "vita run (src/vita/cli.py)", + "setting": "--max-concurrency", + "values": "an integer", + "default": "1", + "nullius": "fixed:1 - each task is a run of its own; the run's concurrency runs several" + }, + { + "entry": "vita run (src/vita/cli.py)", + "setting": "--save-to, --csv-output, --log-level", + "values": "paths, a level", + "default": "a file per run, none, DEBUG", + "nullius": "fixed:the trial's verifier/simulation.json, none, INFO - output only" + }, + { + "entry": "vita run (src/vita/cli.py)", + "setting": "--re-evaluate-file, --re-run", + "values": "a results file, a flag", + "default": "none", + "nullius": "not offered - re-scores a saved run; changes no run" + }, + { + "entry": "environment", + "setting": "VITA_MODEL_CONFIG_PATH", + "values": "a path", + "default": "src/vita/models.yaml", + "nullius": "fixed:the package's models.yaml - the run's three models are added to its entries, over its default one" + }, + { + "entry": "models.yaml", + "setting": "base_url, headers", + "values": "an address, headers", + "default": "none", + "nullius": "fixed:the run's relay - every model call goes through it" + }, + { + "entry": "models.yaml", + "setting": "temperature", + "values": "a number", + "default": "0.0", + "nullius": "option:agent_temperature" + }, + { + "entry": "models.yaml", + "setting": "temperature of the user and the evaluator", + "values": "a number", + "default": "0.0", + "nullius": "fixed:0.0 - the upstream's default entry, the paper's" + }, + { + "entry": "models.yaml", + "setting": "max_tokens, max_completion_tokens", + "values": "an integer", + "default": "8192 to 32768 per model, none in the default entry", + "nullius": "option:agent_max_tokens" + }, + { + "entry": "models.yaml", + "setting": "max_tokens of the user and the evaluator", + "values": "an integer", + "default": "8192 to 32768 per model, none in the default entry", + "nullius": "fixed:none sent - the upstream's default entry" + }, + { + "entry": "models.yaml", + "setting": "max_input_tokens", + "values": "an integer", + "default": "32768", + "nullius": "fixed:32768 - the upstream's default; it is sent and read by no code" + }, + { + "entry": "models.yaml", + "setting": "reasoning_effort", + "values": "a level", + "default": "none", + "nullius": "option:agent_reasoning_effort" + }, + { + "entry": "models.yaml", + "setting": "thinking.budget_tokens", + "values": "an integer", + "default": "16384 for claude-3.7-sonnet", + "nullius": "not offered - a Claude field the OpenAI-compatible route does not take" + }, + { + "entry": "models.yaml", + "setting": "cost_1m_token_dollar", + "values": "prices", + "default": "2.00 and 8.00 for gpt-4.1", + "nullius": "fixed:none - the relay counts the cost" + }, + { + "entry": "hard-coded", + "setting": "run_task max_retries", + "values": "an integer", + "default": "3", + "nullius": "fixed:3 - the upstream's" + }, + { + "entry": "hard-coded", + "setting": "evaluator window_size, overlap", + "values": "integers", + "default": "10, 2", + "nullius": "fixed:10 and 2 - the upstream's, no flag sets them" + }, + { + "entry": "hard-coded", + "setting": "neutral user (the paper's ablation)", + "values": "a user without behavioral attributes", + "default": "none", + "nullius": "not offered - its code is not published" + } +] diff --git a/app/nullius/standard/pages/recipe.py b/app/nullius/standard/pages/recipe.py index 84679ca3b..caa680c9d 100644 --- a/app/nullius/standard/pages/recipe.py +++ b/app/nullius/standard/pages/recipe.py @@ -175,7 +175,7 @@ def _bench_page(b: dict) -> dict: "controls": controls, # One Original procedure, with separate reference-participant and paper-model metadata. "setups": [{"key": k, "label": definitions.setup_label(b, k), "summary": x["summary"], - "reference_agent": x.get("reference_agent", ""), "turn_seconds": x.get("turn_seconds"), + "reference_agent": x.get("reference_agent", ""), "turn_seconds": x.get("turn_seconds"), "gone": x.get("comparable") == [], "comparable": k == "original" and b["setups"]["original"].get("comparable", True) not in (False, []), "units": (b["setups"]["original"].get("units") or b.get("units") or {}), **({"models": definitions.paper_models(x), "default": x["default"], "providers": list(x["providers"]), "sent": {p: {m: pre + (x.get("served_as") or {}).get(m, m) for m in definitions.paper_models(x)} @@ -584,7 +584,9 @@ def add(step, message, shown=False, field=None, unset=False): orig = (b.get("setups") or {}).get("original") or {} official = {"judge": ((b.get("score") or {}).get("judge") or {}).get("model", ""), "simulator": (b.get("simulator") or {}).get("model", "")} fixed = {**official, **{k: lb[k] for k in ("judge", "simulator") if lb.get(k)}} - if model_choice == "paper" and needs_model and not orig.get("models") and not any(official.values()): + if model_choice == "paper" and needs_model and orig.get("comparable") == []: + add("model", "Paper models unavailable; choose Any of your choice.") + elif model_choice == "paper" and needs_model and not orig.get("models") and not any(official.values()): add("model", "No paper models are listed for this benchmark; choose Any of your choice.") elif model_choice == "paper" and needs_model and orig.get("models"): if recipe.get("model") not in definitions.paper_models(orig): diff --git a/app/static/builder/command-builder-core.js b/app/static/builder/command-builder-core.js index d3fa7ce7d..3ccfb6b23 100644 --- a/app/static/builder/command-builder-core.js +++ b/app/static/builder/command-builder-core.js @@ -78,7 +78,9 @@ } // Like the paper keeps what the paper fixed: its models when it lists them, its judge and its user simulator. const paperListed = r => !!(paperModels(r).models || []).length; - const paperOffered = r => { const b = standardBench(r) || {}; return paperListed(r) || !!(b.judge || b.simulator); }; + // none of what the paper ran can run any more (comparable: []): a retired model, judge or user simulator + const paperGone = r => !!(((standardBench(r) || {}).setups || []).find(x => x.key === 'original') || {}).gone; + const paperOffered = r => { const b = standardBench(r) || {}; return !paperGone(r) && (paperListed(r) || !!(b.judge || b.simulator)); }; // Like the leaderboard: what the upstream's leaderboard fixes besides the ranked model, when the benchmark declares it. const leaderboard = r => (standardBench(r) || {}).leaderboard || null; // Choose how the model is chosen: paper or leaderboard keep their fixed models (the leaderboard also its options and diff --git a/app/static/catalogue/marks.svg b/app/static/catalogue/marks.svg index dce84e25b..3bfe63fb9 100644 --- a/app/static/catalogue/marks.svg +++ b/app/static/catalogue/marks.svg @@ -35,4 +35,8 @@ + + + + diff --git a/app/tests/test_catalog.py b/app/tests/test_catalog.py index fd792c27f..500c4a459 100644 --- a/app/tests/test_catalog.py +++ b/app/tests/test_catalog.py @@ -33,7 +33,7 @@ def test_shipped_catalogue_is_consistent(self): self.assertEqual(titles, sorted(titles, key=catalog.sort_key)) # what has a usable route is listed, whoever made it and whether or not it has run listed = {x.key for x in cat.listed_benchmarks} - self.assertEqual(sorted(listed), ["gaia", "gsm8k", "humaneval", "locomo", "longmemeval", "open-telco", "osworld1", "osworld2", "swe-bench-verified", "tau3-bench", "terminal-bench"]) + self.assertEqual(sorted(listed), ["gaia", "gsm8k", "humaneval", "locomo", "longmemeval", "open-telco", "osworld1", "osworld2", "swe-bench-verified", "tau3-bench", "terminal-bench", "vitabench"]) self.assertEqual((cat.benchmark("longmemeval").origin, cat.benchmark("longmemeval").label), ("official", "Official")) self.assertEqual(cat.benchmark("tau3-bench").label, "Official") # τ³ files as "t3…", before "te…": a reader looking under T finds it diff --git a/app/tests/test_standard_setups.py b/app/tests/test_standard_setups.py index 5a724c2d5..c2dc6078f 100644 --- a/app/tests/test_standard_setups.py +++ b/app/tests/test_standard_setups.py @@ -350,6 +350,16 @@ def test_like_the_paper_without_paper_models_leaves_the_model_free_and_keeps_the gsm = self.compiled(benchmark="gsm8k", datasets=["test"], others=["original"], provider="openai", model="m", model_choice="paper") self.assertTrue(gsm["errors"]) + def test_a_retired_judge_refuses_like_the_paper_and_leaves_any_model(self): + vita = dict(benchmark="vitabench", datasets=["cross"], others=["original"], provider="openrouter", model="vendor/m") + said = " ".join(e["message"] for e in self.compiled(**vita, model_choice="paper")["errors"]) + self.assertIn("Paper models unavailable", said) + out = self.compiled(**vita, model_choice="any", judge_model="vendor/judge") + self.assertEqual(out["errors"], []) + self.assertIn("run vitabench original --model vendor/m", out["script"]) + o, _ = definitions.setup(definitions.get("benchmark", "vitabench"), "original", "vendor/m", "openrouter") + self.assertEqual((o["sent"], o["comparable"]), ("vendor/m", False)) + def test_like_the_leaderboard_runs_its_user_simulator_options_and_attempts(self): tau = dict(benchmark="tau3-bench", datasets=["airline"], others=["original"], provider="openai", model="their-model", model_choice="leaderboard") diff --git a/app/tests/test_standard_vitabench.py b/app/tests/test_standard_vitabench.py new file mode 100644 index 000000000..9295b03fc --- /dev/null +++ b/app/tests/test_standard_vitabench.py @@ -0,0 +1,195 @@ +"""VitaBench in the standard runs its upstream: its runner, user simulator, tools and +evaluator. The simulated user and the judge are a local fake endpoint: no key, no +network. Skipped without the upstream and the driver's environment under +``STANDARD_DIR`` (``cli prove vitabench`` installs both).""" +from __future__ import annotations + +import json +import os +import re +import shutil +import subprocess +import tempfile +import threading +import unittest +from http.server import BaseHTTPRequestHandler, ThreadingHTTPServer + +from nullius.standard.contract import definitions +from nullius.standard.protocols import jsonl +from nullius.standard.requirements import install + +APP = os.path.dirname(os.path.dirname(os.path.abspath(definitions.CATALOGUE))) # what a driver imports +BENCH = definitions.get("benchmark", "vitabench") + + +def _ready(): + if not (install.ready(install.upstream_dir(BENCH)) and install.ready(install.driver_dir(BENCH))): + return "VitaBench's upstream and driver environment are not installed (cli prove vitabench)" + return "" + + +class Fake(BaseHTTPRequestHandler): + """The simulated user, its lines from a script, and the judge, which finds every rubric met or cannot answer.""" + lines, asked, judge_ok, missed = [], [], True, None + + def log_message(self, *a): + pass + + def do_POST(self): + body = json.loads(self.rfile.read(int(self.headers["Content-Length"]))) + Fake.asked.append(body) + said = json.dumps(body["messages"]) + if "" not in said: + text = Fake.lines.pop(0) + else: + text = json.dumps([{"rubric_idx": k, "justification": "it did", "meetExpectation": k != Fake.missed} + for k in sorted(set(re.findall(r"rubric_\d+", said)))]) if Fake.judge_ok else None + out = json.dumps({"choices": [{"message": {"role": "assistant", "content": text}}] if text is not None else [], + "usage": {"prompt_tokens": 1, "completion_tokens": 1}}).encode() + self.send_response(200) + self.send_header("Content-Type", "application/json") + self.send_header("Content-Length", str(len(out))) + self.end_headers() + self.wfile.write(out) + + +@unittest.skipIf(_ready(), _ready()) +class Upstream(unittest.TestCase): + @classmethod + def setUpClass(cls): + cls.up = install.upstream_dir(BENCH) + cls.argv, cls.extra = install.driver_argv(BENCH) + cls.srv = ThreadingHTTPServer(("127.0.0.1", 0), Fake) + threading.Thread(target=cls.srv.serve_forever, daemon=True).start() + cls.route = {"model": "fake", "base_url": f"http://127.0.0.1:{cls.srv.server_port}/v1", "key": "placeholder"} + + @classmethod + def tearDownClass(cls): + cls.srv.shutdown() + cls.srv.server_close() + + def setUp(self): + self.tmp = tempfile.mkdtemp() + self.addCleanup(shutil.rmtree, self.tmp, True) + Fake.lines, Fake.asked, Fake.judge_ok, Fake.missed = [], [], True, None + + def env(self, dataset): + ds = next(d for d in BENCH["datasets"] if d["id"] == dataset) + return dict(self.extra, PATH=os.environ.get("PATH", os.defpath), HOME=self.tmp, PYTHONPATH=APP, + PYTHONDONTWRITEBYTECODE="1", NULLIUS_UPSTREAM=self.up, + NULLIUS_DATASET=os.path.join(self.up, ds["path"]), NULLIUS_DATASET_ID=dataset) + + def opened(self, dataset, unit, lines): + """A unit set up and its MCP server started: the setup, and how to list tools, call one, take a turn and score.""" + env = self.env(dataset) + d = jsonl.Proc(self.argv, BENCH["_here"], env, os.path.join(self.tmp, "driver.log")).start() + self.addCleanup(d.close) + ws = os.path.join(self.tmp, "unit", "workspace") + os.makedirs(ws) + s = d.request("setup", unit=unit, dir=ws) + cmd = install.words(BENCH["mcp_servers"]["vita"]["command"], {"here": BENCH["_here"], "install": install.driver_dir(BENCH)}) + p = subprocess.Popen(cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.DEVNULL, text=True, + env=dict(env, **s["mcp"][0]["env"])) + self.addCleanup(lambda: (p.kill(), p.wait(), p.stdin.close(), p.stdout.close())) + n = [0] + + def ask(method, params=None): + n[0] += 1 + p.stdin.write(json.dumps({"jsonrpc": "2.0", "id": n[0], "method": method, "params": params or {}}) + "\n") + p.stdin.flush() + while True: + m = json.loads(p.stdout.readline()) + if m.get("id") == n[0]: + return m + ask("initialize", {"protocolVersion": "2025-06-18", "capabilities": {}, "clientInfo": {"name": "t", "version": "1"}}) + p.stdin.write(json.dumps({"jsonrpc": "2.0", "method": "notifications/initialized"}) + "\n") + p.stdin.flush() + Fake.lines = list(lines) + + def call(name, arguments): + got = ask("tools/call", {"name": name, "arguments": arguments})["result"] + return got["content"][0]["text"], got["isError"] + + def turn(said=None): + t = [] if said is None else [{"role": "user", "text": "..."}, {"role": "agent", "text": said}] + return d.request("turn", unit=unit, dir=ws, transcript=t, simulator=self.route, judge=self.route) + + def score(): + return d.request("score", unit=unit, dir=ws, transcript=[], answer="", judge=self.route) + return s, ask, call, turn, score + + def test_the_orchestrator_executes_each_call_and_the_users_stop_ends_it(self): + s, ask, call, turn, score = self.opened("cross-en", "A0812003", ["Lunch, please.", "Thanks. ###STOP###"]) + self.assertIn("Current time: ", s["prompt"]) + tools = ask("tools/list")["result"]["tools"] + self.assertGreater(len(tools), 50) # the three domains' tools + self.assertNotIn("$ref", json.dumps(tools)) + self.assertIn("not started", call("nope", {})[0]) + self.assertEqual(turn(), {"message": "Lunch, please."}) + self.assertEqual(Fake.asked[0]["messages"][1], {"role": "user", "content": "Hello, how can I help you?"}) + text, error = call("nope", {}) + self.assertTrue(error) + self.assertNotIn("was not made", text) # the upstream's own answer + text, error = call("longitude_latitude_to_distance", {"longitude1": 1, "latitude1": 1, "longitude2": 1, "latitude2": 1}) + self.assertFalse(error, text) + self.assertEqual(turn("Ordered."), {"done": True}) + self.assertIn("conversation has ended (user_stop)", call("nope", {})[0]) + r = score() + self.assertEqual((r["reward"], r["detail"]["termination"], r["detail"]["tool_calls"], r["detail"]["tool_errors"]), + (1.0, "user_stop", 2, 1), r["detail"]) + self.assertNotIn("window_evaluations", r["detail"]["reward_info"]) + self.assertTrue(os.path.isfile(os.path.join(self.tmp, "unit", "verifier", "simulation.json"))) + + def test_ten_tool_errors_score_zero_unjudged(self): + _, _, call, turn, score = self.opened("delivery", "10711001", ["你好"]) + turn() + for _ in range(9): + call("nope", {}) + self.assertIn("too_many_errors", call("nope", {})[0]) + self.assertEqual(turn("bye ###STOP###"), {"done": True}) + r = score() + self.assertEqual((r["reward"], r["detail"]["termination"]), (0.0, "too_many_errors")) + self.assertEqual(len(Fake.asked), 1) # the user's first line alone + + def test_the_agents_stop_is_judged(self): + _, _, _, turn, score = self.opened("instore", "10826004", ["你好"]) + turn() + self.assertEqual(turn("好的 ###STOP###"), {"done": True}) + r = score() + self.assertEqual((r["reward"], r["detail"]["termination"]), (1.0, "agent_stop")) + + def test_one_missed_rubric_fails_the_task_and_is_named(self): + _, _, _, turn, score = self.opened("instore", "10826004", ["你好"]) + Fake.missed = "rubric_0" + turn() + turn("好的 ###STOP###") + r = score() + self.assertEqual((r["reward"], r["passed"], list(r["detail"]["rubrics_missed"].values())), (0.0, False, ["it did"])) + + def test_an_empty_final_message_is_the_agents_invalid_message(self): + _, _, call, turn, score = self.opened("ota", "D0812006", ["你好"]) + turn() + call("nope", {}) + self.assertEqual(turn(""), {"done": True}) + r = score() + self.assertEqual((r["reward"], r["detail"]["termination"]), (0.0, "invalid_agent_message")) + + def test_a_judge_that_fails_is_the_units_error_never_a_score(self): + _, _, _, turn, score = self.opened("delivery-en", "10711001", ["Hello."]) + Fake.judge_ok = False + turn() + self.assertEqual(turn("ok ###STOP###"), {"done": True}) + with self.assertRaises(jsonl.Failed) as e: + score() + self.assertIn("evaluator raised", str(e.exception)) + + def test_a_failed_user_call_starts_the_conversation_again(self): + _, _, _, turn, score = self.opened("delivery-en", "10711001", ["Hello.", "", "Hello again.", "Bye ###STOP###"]) + turn() + self.assertEqual(turn("What would you like?"), {"message": "Hello again.", "restart": True}) + self.assertEqual(turn("Done."), {"done": True}) + self.assertEqual(score()["detail"]["attempts"], 2) + + +if __name__ == "__main__": + unittest.main() diff --git a/app/ui_tests/test_catalogue_routes.py b/app/ui_tests/test_catalogue_routes.py index a2dd974fe..312b1e49e 100644 --- a/app/ui_tests/test_catalogue_routes.py +++ b/app/ui_tests/test_catalogue_routes.py @@ -130,7 +130,7 @@ def test_every_listed_benchmark_is_a_card_opening_its_page(self): cat = catalog.load() keys = re.findall(r'', 1)[0] for b in cat.listed_benchmarks: diff --git a/app/ui_tests/test_command_builder_state.py b/app/ui_tests/test_command_builder_state.py index f7b467a4a..8e7e3102c 100644 --- a/app/ui_tests/test_command_builder_state.py +++ b/app/ui_tests/test_command_builder_state.py @@ -83,9 +83,9 @@ def test_the_benchmark_comes_first_and_sets_the_runner_that_runs_it(self): "standard", "harbor", "standard", "harbor"]) def test_like_the_paper_is_offered_when_the_paper_fixes_a_model(self): - out = self.js('process.stdout.write(JSON.stringify(["longmemeval","tau3-bench","gsm8k","locomo"].map(k=>{const r=C.createStandard(k);' + out = self.js('process.stdout.write(JSON.stringify(["longmemeval","tau3-bench","gsm8k","locomo","vitabench"].map(k=>{const r=C.createStandard(k);' 'return [C.paperOffered(r),C.paperListed(r)];})));') - self.assertEqual(out, [[True, True], [True, False], [False, False], [False, False]]) + self.assertEqual(out, [[True, True], [True, False], [False, False], [False, False], [False, False]]) def test_like_the_leaderboard_sets_its_options_and_attempts_and_leaving_it_gives_them_back(self): out = self.js('const r=C.createStandard("tau3-bench");r.repeat=2;r.simulator_model="x";' diff --git a/docs/agents/supported/README.md b/docs/agents/supported/README.md index e5603cdfd..07c4ea947 100644 --- a/docs/agents/supported/README.md +++ b/docs/agents/supported/README.md @@ -55,21 +55,21 @@ Every agent in the catalogue, the ports each version has proven, and the benchma ### Benchmarks each agent fits - + - - - - - - - - - - - - - + + + + + + + + + + + + +
GAIAGSM8KHumanEvalOpen TelcoOSWorld1OSWorld2SWE-bench Verifiedτ³-benchTerminal-Bench 2.0
One task, Workspace files, SearchOne taskWorkspace filesOne taskComputer useComputer useWorkspace filesMCP tools, ConversationWorkspace files
GAIAGSM8KHumanEvalOpen TelcoOSWorld1OSWorld2SWE-bench Verifiedτ³-benchTerminal-Bench 2.0VitaBench
One task, Workspace files, SearchOne taskWorkspace filesOne taskComputer useComputer useWorkspace filesMCP tools, ConversationWorkspace filesMCP tools, Conversation
codex@2.2.2✓✓✓✓✓✓✓✓✓
codex@0.16.0✓✓✓✓✗✗✓✓✓
digitalmate@0.1.13✗✓✗✓✗✗✗✗✗
digitalmate@0.1.13-fixes✓✓✓✓✗✗✓✓✓
goose✓✓✓✓✗✗✓✓✓
jiuwenswarm@0.2.7✗✓✓✓✗✗✓✓✓
jiuwenswarm@0.2.8✓✓✓✓✗✗✓✓✓
jiuwenswarm@0.2.9✗✓✓✓✗✗✓✓✓
mini-swe-agent✗✗✗✗✗✗✓✗✗
opencode✓✓✓✓✗✗✓✓✓
reference✗✓✓✓✗✗✓✓✓
swe-agent✗✗✗✗✗✗✓✗✗
terminus-2✗✗✗✗✗✗✗✗✓
codex@2.2.2✓✓✓✓✓✓✓✓✓✓
codex@0.16.0✓✓✓✓✗✗✓✓✓✓
digitalmate@0.1.13✗✓✗✓✗✗✗✗✗✗
digitalmate@0.1.13-fixes✓✓✓✓✗✗✓✓✓✓
goose✓✓✓✓✗✗✓✓✓✓
jiuwenswarm@0.2.7✗✓✓✓✗✗✓✓✓✓
jiuwenswarm@0.2.8✓✓✓✓✗✗✓✓✓✓
jiuwenswarm@0.2.9✗✓✓✓✗✗✓✓✓✓
mini-swe-agent✗✗✗✗✗✗✓✗✗✗
opencode✓✓✓✓✗✗✓✓✓✓
reference✗✓✓✓✗✗✓✓✓✓
swe-agent✗✗✗✗✗✗✓✗✗✗
terminus-2✗✗✗✗✗✗✗✗✓✗
- ✗: the missing port, on hover. diff --git a/docs/agents/supported/codex.md b/docs/agents/supported/codex.md index fa271132c..0aaccf0b2 100644 --- a/docs/agents/supported/codex.md +++ b/docs/agents/supported/codex.md @@ -34,10 +34,10 @@ OpenAI's coding agent. ## Benchmarks it fits - + - - + +
GAIAGSM8KHumanEvalOpen TelcoOSWorld1OSWorld2SWE-bench Verifiedτ³-benchTerminal-Bench 2.0
One task, Workspace files, SearchOne taskWorkspace filesOne taskComputer useComputer useWorkspace filesMCP tools, ConversationWorkspace files
GAIAGSM8KHumanEvalOpen TelcoOSWorld1OSWorld2SWE-bench Verifiedτ³-benchTerminal-Bench 2.0VitaBench
One task, Workspace files, SearchOne taskWorkspace filesOne taskComputer useComputer useWorkspace filesMCP tools, ConversationWorkspace filesMCP tools, Conversation
codex@2.2.2✓✓✓✓✓✓✓✓✓
codex@0.16.0✓✓✓✓✗✗✓✓✓
codex@2.2.2✓✓✓✓✓✓✓✓✓✓
codex@0.16.0✓✓✓✓✗✗✓✓✓✓
- ✗: the missing port, on hover. diff --git a/docs/agents/supported/digitalmate.md b/docs/agents/supported/digitalmate.md index afc0abf32..5f097abe0 100644 --- a/docs/agents/supported/digitalmate.md +++ b/docs/agents/supported/digitalmate.md @@ -32,10 +32,10 @@ None declared. ## Benchmarks it fits - + - - + +
GAIAGSM8KHumanEvalOpen TelcoOSWorld1OSWorld2SWE-bench Verifiedτ³-benchTerminal-Bench 2.0
One task, Workspace files, SearchOne taskWorkspace filesOne taskComputer useComputer useWorkspace filesMCP tools, ConversationWorkspace files
GAIAGSM8KHumanEvalOpen TelcoOSWorld1OSWorld2SWE-bench Verifiedτ³-benchTerminal-Bench 2.0VitaBench
One task, Workspace files, SearchOne taskWorkspace filesOne taskComputer useComputer useWorkspace filesMCP tools, ConversationWorkspace filesMCP tools, Conversation
digitalmate@0.1.13✗✓✗✓✗✗✗✗✗
digitalmate@0.1.13-fixes✓✓✓✓✗✗✓✓✓
digitalmate@0.1.13✗✓✗✓✗✗✗✗✗✗
digitalmate@0.1.13-fixes✓✓✓✓✗✗✓✓✓✓
- ✗: the missing port, on hover. diff --git a/docs/agents/supported/goose.md b/docs/agents/supported/goose.md index 907d34524..b12af2699 100644 --- a/docs/agents/supported/goose.md +++ b/docs/agents/supported/goose.md @@ -30,9 +30,9 @@ The AAIF's open-source agent, formerly Block's. ## Benchmarks it fits - + - +
GAIAGSM8KHumanEvalOpen TelcoOSWorld1OSWorld2SWE-bench Verifiedτ³-benchTerminal-Bench 2.0
One task, Workspace files, SearchOne taskWorkspace filesOne taskComputer useComputer useWorkspace filesMCP tools, ConversationWorkspace files
GAIAGSM8KHumanEvalOpen TelcoOSWorld1OSWorld2SWE-bench Verifiedτ³-benchTerminal-Bench 2.0VitaBench
One task, Workspace files, SearchOne taskWorkspace filesOne taskComputer useComputer useWorkspace filesMCP tools, ConversationWorkspace filesMCP tools, Conversation
goose✓✓✓✓✗✗✓✓✓
goose✓✓✓✓✗✗✓✓✓✓
- ✗: the missing port, on hover. diff --git a/docs/agents/supported/jiuwenswarm.md b/docs/agents/supported/jiuwenswarm.md index bc0191250..861ef6122 100644 --- a/docs/agents/supported/jiuwenswarm.md +++ b/docs/agents/supported/jiuwenswarm.md @@ -36,11 +36,11 @@ openJiuwen's WorkSwarm agent. ## Benchmarks it fits - + - - - + + +
GAIAGSM8KHumanEvalOpen TelcoOSWorld1OSWorld2SWE-bench Verifiedτ³-benchTerminal-Bench 2.0
One task, Workspace files, SearchOne taskWorkspace filesOne taskComputer useComputer useWorkspace filesMCP tools, ConversationWorkspace files
GAIAGSM8KHumanEvalOpen TelcoOSWorld1OSWorld2SWE-bench Verifiedτ³-benchTerminal-Bench 2.0VitaBench
One task, Workspace files, SearchOne taskWorkspace filesOne taskComputer useComputer useWorkspace filesMCP tools, ConversationWorkspace filesMCP tools, Conversation
jiuwenswarm@0.2.7✗✓✓✓✗✗✓✓✓
jiuwenswarm@0.2.8✓✓✓✓✗✗✓✓✓
jiuwenswarm@0.2.9✗✓✓✓✗✗✓✓✓
jiuwenswarm@0.2.7✗✓✓✓✗✗✓✓✓✓
jiuwenswarm@0.2.8✓✓✓✓✗✗✓✓✓✓
jiuwenswarm@0.2.9✗✓✓✓✗✗✓✓✓✓
- ✗: the missing port, on hover. diff --git a/docs/agents/supported/mini-swe-agent.md b/docs/agents/supported/mini-swe-agent.md index f43378ed5..f9e7ce65a 100644 --- a/docs/agents/supported/mini-swe-agent.md +++ b/docs/agents/supported/mini-swe-agent.md @@ -30,9 +30,9 @@ Princeton's 100-line agent, bash only. ## Benchmarks it fits - + - +
GAIAGSM8KHumanEvalOpen TelcoOSWorld1OSWorld2SWE-bench Verifiedτ³-benchTerminal-Bench 2.0
One task, Workspace files, SearchOne taskWorkspace filesOne taskComputer useComputer useWorkspace filesMCP tools, ConversationWorkspace files
GAIAGSM8KHumanEvalOpen TelcoOSWorld1OSWorld2SWE-bench Verifiedτ³-benchTerminal-Bench 2.0VitaBench
One task, Workspace files, SearchOne taskWorkspace filesOne taskComputer useComputer useWorkspace filesMCP tools, ConversationWorkspace filesMCP tools, Conversation
mini-swe-agent✗✗✗✗✗✗✓✗✗
mini-swe-agent✗✗✗✗✗✗✓✗✗✗
- ✗: the missing port, on hover. diff --git a/docs/agents/supported/opencode.md b/docs/agents/supported/opencode.md index c288131d1..903d4971d 100644 --- a/docs/agents/supported/opencode.md +++ b/docs/agents/supported/opencode.md @@ -30,9 +30,9 @@ The open-source terminal coding agent. ## Benchmarks it fits - + - +
GAIAGSM8KHumanEvalOpen TelcoOSWorld1OSWorld2SWE-bench Verifiedτ³-benchTerminal-Bench 2.0
One task, Workspace files, SearchOne taskWorkspace filesOne taskComputer useComputer useWorkspace filesMCP tools, ConversationWorkspace files
GAIAGSM8KHumanEvalOpen TelcoOSWorld1OSWorld2SWE-bench Verifiedτ³-benchTerminal-Bench 2.0VitaBench
One task, Workspace files, SearchOne taskWorkspace filesOne taskComputer useComputer useWorkspace filesMCP tools, ConversationWorkspace filesMCP tools, Conversation
opencode✓✓✓✓✗✗✓✓✓
opencode✓✓✓✓✗✗✓✓✓✓
- ✗: the missing port, on hover. diff --git a/docs/agents/supported/swe-agent.md b/docs/agents/supported/swe-agent.md index 9413747ed..3949b6048 100644 --- a/docs/agents/supported/swe-agent.md +++ b/docs/agents/supported/swe-agent.md @@ -28,9 +28,9 @@ None declared. ## Benchmarks it fits - + - +
GAIAGSM8KHumanEvalOpen TelcoOSWorld1OSWorld2SWE-bench Verifiedτ³-benchTerminal-Bench 2.0
One task, Workspace files, SearchOne taskWorkspace filesOne taskComputer useComputer useWorkspace filesMCP tools, ConversationWorkspace files
GAIAGSM8KHumanEvalOpen TelcoOSWorld1OSWorld2SWE-bench Verifiedτ³-benchTerminal-Bench 2.0VitaBench
One task, Workspace files, SearchOne taskWorkspace filesOne taskComputer useComputer useWorkspace filesMCP tools, ConversationWorkspace filesMCP tools, Conversation
swe-agent✗✗✗✗✗✗✓✗✗
swe-agent✗✗✗✗✗✗✓✗✗✗
- ✗: the missing port, on hover. diff --git a/docs/agents/supported/terminus-2.md b/docs/agents/supported/terminus-2.md index fcc73382d..d5073b2ad 100644 --- a/docs/agents/supported/terminus-2.md +++ b/docs/agents/supported/terminus-2.md @@ -30,9 +30,9 @@ Harbor's terminal agent, used by Terminal-Bench. ## Benchmarks it fits - + - +
GAIAGSM8KHumanEvalOpen TelcoOSWorld1OSWorld2SWE-bench Verifiedτ³-benchTerminal-Bench 2.0
One task, Workspace files, SearchOne taskWorkspace filesOne taskComputer useComputer useWorkspace filesMCP tools, ConversationWorkspace files
GAIAGSM8KHumanEvalOpen TelcoOSWorld1OSWorld2SWE-bench Verifiedτ³-benchTerminal-Bench 2.0VitaBench
One task, Workspace files, SearchOne taskWorkspace filesOne taskComputer useComputer useWorkspace filesMCP tools, ConversationWorkspace filesMCP tools, Conversation
terminus-2✗✗✗✗✗✗✗✗✓
terminus-2✗✗✗✗✗✗✗✗✓✗
- ✗: the missing port, on hover. diff --git a/docs/benchmarks/supported/README.md b/docs/benchmarks/supported/README.md index 735c499f2..a445f14e2 100644 --- a/docs/benchmarks/supported/README.md +++ b/docs/benchmarks/supported/README.md @@ -23,6 +23,7 @@ Every benchmark in the catalogue: where it runs, what it needs, the ways it runs
SWE-bench Verified
swe-bench-verifiedSoftware engineering: fix a real GitHub issue so the failing tests pass.Coding✓✓500Official τ³-bench
tau3-benchCustomer service with domain tools and a simulated user: airline, retail, telecom, banking.Customer service✓✓375Official Terminal-Bench 2.0
terminal-benchReal terminal tasks in a container: build, configure, debug.Terminal✓✓89Official +VitaBench
vitabenchFood delivery, in-store and travel requests from a simulated user, with up to 66 tools.Life services✓–400Official ### How each runs @@ -41,6 +42,7 @@ Every benchmark in the catalogue: where it runs, what it needs, the ways it runs SWE-bench Verifiedagent.workspace/v1Nulliusthe authors✓✓✓ τ³-benchagent.tools/v1, agent.conversation/v1NulliusNullius✓✓✓ Terminal-Bench 2.0agent.workspace/v1Nulliusthe authors✓✓✓ +VitaBenchagent.tools/v1, agent.conversation/v1Nullius–✓✓✓ - Nullius wrote a control where the upstream published none. diff --git a/docs/benchmarks/supported/vitabench.md b/docs/benchmarks/supported/vitabench.md new file mode 100644 index 000000000..0be140cda --- /dev/null +++ b/docs/benchmarks/supported/vitabench.md @@ -0,0 +1,83 @@ + + +# VitaBench + +Food delivery, in-store and travel requests from a simulated user, with up to 66 tools. + + + + + + + + + + +
Keyvitabench
CategoryLife services
OriginOfficial
Runs onNullius
Tasks400
PaperVitaBench: Benchmarking LLM Agents with Versatile Interactive Tasks in Real-world Applications, arXiv · 2025
Needs, ports provenagent.tools/v1, agent.conversation/v1
+ +## Datasets + +| Dataset | Key | Tasks | From | Verifier | +|---|---|---|---|---| +| VitaBench | `vitabench` | 400 | GitHub [meituan-longcat/vitabench](https://github.com/meituan-longcat/vitabench/tree/742e240855bf8686a0842360749d5ea970ea3987) | VitaBench's evaluator: a judge model marks each task's rubrics. | + +## On the standard + +| Control | Written by | +|---|---| +| `nop` | Nullius | + +### Versions + +| Version | Setups as published, whose model | Options | +|---|---|---| +| `vitabench` | Original · VitaBench LLM agent · Like the paper or Any of your choice | `agent_max_tokens`, `agent_reasoning_effort`, `agent_temperature`, `enable_think`, `evaluation`, `max_errors`, `max_steps`, `upstream_agent`, `user` | + +## Options + +| Option | Values, default in bold | What it sets | Setups | +|---|---|---|---| +| `agent_max_tokens` | e.g. `8192`, default `default` | The longest reply of the benchmark's own agent model. The default sends no limit. | `original` | +| `agent_reasoning_effort` | **`default`**, `minimal`, `low`, `medium`, `high`, `xhigh` | How much reasoning the benchmark's own agent model uses. | `original` | +| `agent_temperature` | e.g. `0.7`, default `0.0` | The temperature of the benchmark's own agent model, the paper's 0 by default. | `original` | +| `enable_think` | **`off` (Off)**, `on` (On) | Whether the benchmark's own agent model thinks (the upstream's --enable-think). | `original` | +| `evaluation` | **`trajectory` (Sliding window, rubrics)**, `trajectory_full_traj_rubric` (Whole conversation, rubrics), `trajectory_sliding_wo_rubric` (Sliding window, no rubrics), `trajectory_full_traj_wo_rubric` (Whole conversation, no rubrics) | How the judge reads the conversation. | `original`, `yours` | +| `max_errors` | e.g. `5`, default `10` | The most tool calls that fail before a conversation ends. | `original`, `yours` | +| `max_steps` | e.g. `100`, default `300` | The most messages and tool rounds of a conversation. | `original`, `yours` | +| `upstream_agent` | **`llm_agent` (Conversation)**, `llm_solo_agent` (Solo) | Whether the benchmark's own agent talks with the user or works alone. | `original` | +| `user` | **`user_simulator` (Step by step)**, `dummy_user` (All at once) | How the simulated user tells what it wants. | `original`, `yours` | + +## Good to know + +- The paper's judge, Claude 3.7 Sonnet, is retired, so Like the paper cannot run: choose Any of your choice and a judge model. Scores compare only between runs with the same judge, never with the paper's. +- Scores depend on the judge's and the simulated user's models: keep both fixed when comparing. +- The leaderboard's main result is Cross-scenario, in Chinese, with 4 attempts per task. +- A task passes only when every rubric is met. + +## Upstream limitations + +- In 15 of the 100 Cross-scenario (English) tasks, the shops, orders or bookings the task relies on are missing, though the Chinese version has them: an agent may fail them through no fault of its own. Score with the Chinese datasets. +- Its model calls carry configuration fields (base_url, headers, name, max_input_tokens) that OpenAI's API refuses with HTTP 400: run every model of a VitaBench run on OpenRouter (OpenAI's models are there as openai/...) or a custom endpoint. +- A failed model call makes the upstream start the conversation again, up to 3 times, and each costs its calls. +- The updated leaderboard does not name its judge model. +- Its dependencies are not locked to versions. + +## Nullius limitations + +- Another agent replaces the upstream's agent. It gets the upstream's prompt, plus lines from Nullius: where its tools are, and that its last message in a turn goes to the user. +- With another agent, a judge that fails is the task's error: the upstream's restart of the conversation is not followed. +- With another agent, one empty final message ends the conversation. The upstream asks its own agent 3 times. +- There is no reference control: the upstream publishes no reference conversations. + +## Cite + +??? citation "BibTeX" + + ```bibtex + @article{he2025vitabench, + title={VitaBench: Benchmarking LLM Agents with Versatile Interactive Tasks in Real-world Applications}, + author={He, Wei and Sun, Yueqing and Hao, Hongyan and Hao, Xueyuan and Xia, Zhikang and Gu, Qi and Han, Chengcheng and Zhao, Dengchang and Su, Hui and Zhang, Kefeng and Gao, Man and Su, Xi and Cai, Xiaodong and Cai, Xunliang and Yang, Yu and Zhao, Yunke}, + journal={arXiv preprint arXiv:2509.26490}, + year={2025} + } + ``` diff --git a/docs/standard.md b/docs/standard.md index 1edfd71c5..6b0339053 100644 --- a/docs/standard.md +++ b/docs/standard.md @@ -633,7 +633,7 @@ already accepts arbitrary models needs only the `original` method. | `model` driver method | The upstream is told `runs_as` (its window, batching and token budget) while the relay sends the model chosen. A model that reasons by default can spend that budget thinking: a last reply with neither text nor a tool call is `OutputLengthExceededError`. A last Responses reply that `failed` is an API error. A runner that fails after the unit is asked to stop is `CancelledError` | | `units` | A setup may count its own units; `units` is sent `setup` | | `answer` | Runs the upstream's answerer through the unit's relay; `score` is sent `setup` too. Local processes or the Original setup driver container | -| `comparable` | `false` when no model of `models` is the paper's, so its runs compare with each other only; or the list of those models whose runs compare with the paper's (`paper`), when the setup runs several agents and only some are the paper's: the builder offers those alone as Like the paper, the others as Any of your choice; or `[]` when none can be run any more: Like the paper is greyed out, and `run BENCHMARK original` refused | +| `comparable` | `false` when no model of `models` is the paper's, so its runs compare with each other only; or the list of those models whose runs compare with the paper's (`paper`), when the setup runs several agents and only some are the paper's: the builder offers those alone as Like the paper, the others as Any of your choice; or `[]` when none can be run any more: Like the paper is greyed out, and `run BENCHMARK original` refused. Without `models`, `[]` says the paper's judge or user simulator is retired: Original still takes any model | | Recorded | `standard.setup` in the config and each trial: its name, the model `asked` and `sent`, `comparable_with_paper`, and the benchmark's own agent that ran (`agent`), whose key is also the job's agent (`agent_info.name`) | | Attempts | `cli run --attempts K` runs each unit K times; `result.json` carries [`pass_hat_k`](field-guide.md#attempts) | | Retries | `cli run --retries N` runs a failed attempt again: [which failures](cli/run.md#retries) | From d9eaed57e52cce4bfc6d82494bd4be46168a4f82 Mon Sep 17 00:00:00 2001 From: Etienne Filhol Date: Thu, 26 Nov 2026 11:13:42 +0100 Subject: [PATCH 02/15] fix(catalogue): VitaBench's seedling mark, Chinese dataset labels, model-neutral thinking text --- .../catalogue/benchmarks/vitabench/benchmark.json | 10 +++++----- .../catalogue/benchmarks/vitabench/standard.json | 14 +++++++------- app/static/catalogue/marks.svg | 6 ++---- docs/benchmarks/supported/vitabench.md | 12 ++++++------ 4 files changed, 20 insertions(+), 22 deletions(-) diff --git a/app/nullius/catalogue/benchmarks/vitabench/benchmark.json b/app/nullius/catalogue/benchmarks/vitabench/benchmark.json index eaaefc12c..52654a0a3 100644 --- a/app/nullius/catalogue/benchmarks/vitabench/benchmark.json +++ b/app/nullius/catalogue/benchmarks/vitabench/benchmark.json @@ -11,7 +11,7 @@ "good_to_know": [ "The paper's judge, Claude 3.7 Sonnet, is retired, so Like the paper cannot run: choose Any of your choice and a judge model. Scores compare only between runs with the same judge, never with the paper's.", "Scores depend on the judge's and the simulated user's models: keep both fixed when comparing.", - "The leaderboard's main result is Cross-scenario, in Chinese, with 4 attempts per task.", + "The leaderboard's main result is Cross-scenario (Chinese), with 4 attempts per task.", "A task passes only when every rubric is met." ], "upstream_limitations": [ @@ -19,13 +19,13 @@ "Its model calls carry configuration fields (base_url, headers, name, max_input_tokens) that OpenAI's API refuses with HTTP 400: run every model of a VitaBench run on OpenRouter (OpenAI's models are there as openai/...) or a custom endpoint.", "A failed model call makes the upstream start the conversation again, up to 3 times, and each costs its calls.", "The updated leaderboard does not name its judge model.", - "Its dependencies are not locked to versions." + "Its dependencies are not locked to versions.", + "It publishes no reference conversations, so there is no reference control." ], "limitations": [ - "Another agent replaces the upstream's agent. It gets the upstream's prompt, plus lines from Nullius: where its tools are, and that its last message in a turn goes to the user.", + "Another agent gets the upstream's prompt plus two lines from Nullius: where its tools are, and that its last message in a turn goes to the user.", "With another agent, a judge that fails is the task's error: the upstream's restart of the conversation is not followed.", - "With another agent, one empty final message ends the conversation. The upstream asks its own agent 3 times.", - "There is no reference control: the upstream publishes no reference conversations." + "With another agent, one empty final message ends the conversation. The upstream asks its own agent 3 times." ], "datasets": [ { diff --git a/app/nullius/catalogue/benchmarks/vitabench/standard.json b/app/nullius/catalogue/benchmarks/vitabench/standard.json index f375ae38b..0eaf510da 100644 --- a/app/nullius/catalogue/benchmarks/vitabench/standard.json +++ b/app/nullius/catalogue/benchmarks/vitabench/standard.json @@ -39,28 +39,28 @@ "datasets": [ { "id": "cross", - "label": "Cross-scenario", + "label": "Cross-scenario (Chinese)", "path": "data/vita/domains/cross_domain/tasks.json", "sha256": "a7e782785f40667511a54562d613e2122de645a36b8661a5658c1740d34a5815", "units": 100 }, { "id": "delivery", - "label": "Delivery", + "label": "Delivery (Chinese)", "path": "data/vita/domains/delivery/tasks.json", "sha256": "22746ae23eb6dbed2ee6a5e3a0f476af60e8a43bab0ea2d3ead54f0ef3829f94", "units": 100 }, { "id": "instore", - "label": "In-store", + "label": "In-store (Chinese)", "path": "data/vita/domains/instore/tasks.json", "sha256": "f92b9313e5476499d51b73a929cc901b7d87cd7c3315df56942d62c83aa34407", "units": 100 }, { "id": "ota", - "label": "OTA", + "label": "OTA (Chinese)", "path": "data/vita/domains/ota/tasks.json", "sha256": "c9208c25accef24f4798bbd3f38403da081fdf48f3c7100dfc702aa7b379559e", "units": 100 @@ -243,8 +243,8 @@ "on" ], "about": { - "off": "The upstream's default: no reasoning effort sent, Claude's thinking disabled.", - "on": "Sends the reasoning effort below; Claude and DeepSeek replies keep their reasoning." + "off": "The upstream's default: no reasoning effort sent. On a Claude model, thinking is turned off.", + "on": "Sends the reasoning effort below. On Claude and DeepSeek models, earlier reasoning is sent back." } }, "agent_reasoning_effort": { @@ -267,7 +267,7 @@ ] }, "about": { - "default": "None sent: the provider's own." + "default": "None sent: the model's own default." } }, "agent_temperature": { diff --git a/app/static/catalogue/marks.svg b/app/static/catalogue/marks.svg index 3bfe63fb9..e8aff7ed8 100644 --- a/app/static/catalogue/marks.svg +++ b/app/static/catalogue/marks.svg @@ -35,8 +35,6 @@ - - - - + + diff --git a/docs/benchmarks/supported/vitabench.md b/docs/benchmarks/supported/vitabench.md index 0be140cda..07076449a 100644 --- a/docs/benchmarks/supported/vitabench.md +++ b/docs/benchmarks/supported/vitabench.md @@ -39,11 +39,11 @@ Food delivery, in-store and travel requests from a simulated user, with up to 66 |---|---|---|---| | `agent_max_tokens` | e.g. `8192`, default `default` | The longest reply of the benchmark's own agent model. The default sends no limit. | `original` | | `agent_reasoning_effort` | **`default`**, `minimal`, `low`, `medium`, `high`, `xhigh` | How much reasoning the benchmark's own agent model uses. | `original` | -| `agent_temperature` | e.g. `0.7`, default `0.0` | The temperature of the benchmark's own agent model, the paper's 0 by default. | `original` | +| `agent_temperature` | default `0.0` | The temperature of the benchmark's own agent model, the paper's 0 by default. | `original` | | `enable_think` | **`off` (Off)**, `on` (On) | Whether the benchmark's own agent model thinks (the upstream's --enable-think). | `original` | | `evaluation` | **`trajectory` (Sliding window, rubrics)**, `trajectory_full_traj_rubric` (Whole conversation, rubrics), `trajectory_sliding_wo_rubric` (Sliding window, no rubrics), `trajectory_full_traj_wo_rubric` (Whole conversation, no rubrics) | How the judge reads the conversation. | `original`, `yours` | -| `max_errors` | e.g. `5`, default `10` | The most tool calls that fail before a conversation ends. | `original`, `yours` | -| `max_steps` | e.g. `100`, default `300` | The most messages and tool rounds of a conversation. | `original`, `yours` | +| `max_errors` | default `10` | The most tool calls that fail before a conversation ends. | `original`, `yours` | +| `max_steps` | default `300` | The most messages and tool rounds of a conversation. | `original`, `yours` | | `upstream_agent` | **`llm_agent` (Conversation)**, `llm_solo_agent` (Solo) | Whether the benchmark's own agent talks with the user or works alone. | `original` | | `user` | **`user_simulator` (Step by step)**, `dummy_user` (All at once) | How the simulated user tells what it wants. | `original`, `yours` | @@ -51,7 +51,7 @@ Food delivery, in-store and travel requests from a simulated user, with up to 66 - The paper's judge, Claude 3.7 Sonnet, is retired, so Like the paper cannot run: choose Any of your choice and a judge model. Scores compare only between runs with the same judge, never with the paper's. - Scores depend on the judge's and the simulated user's models: keep both fixed when comparing. -- The leaderboard's main result is Cross-scenario, in Chinese, with 4 attempts per task. +- The leaderboard's main result is Cross-scenario (Chinese), with 4 attempts per task. - A task passes only when every rubric is met. ## Upstream limitations @@ -61,13 +61,13 @@ Food delivery, in-store and travel requests from a simulated user, with up to 66 - A failed model call makes the upstream start the conversation again, up to 3 times, and each costs its calls. - The updated leaderboard does not name its judge model. - Its dependencies are not locked to versions. +- It publishes no reference conversations, so there is no reference control. ## Nullius limitations -- Another agent replaces the upstream's agent. It gets the upstream's prompt, plus lines from Nullius: where its tools are, and that its last message in a turn goes to the user. +- Another agent gets the upstream's prompt plus two lines from Nullius: where its tools are, and that its last message in a turn goes to the user. - With another agent, a judge that fails is the task's error: the upstream's restart of the conversation is not followed. - With another agent, one empty final message ends the conversation. The upstream asks its own agent 3 times. -- There is no reference control: the upstream publishes no reference conversations. ## Cite From a845234f728cd2b3530a5db71de7070cec532a2d Mon Sep 17 00:00:00 2001 From: Etienne Filhol Date: Thu, 26 Nov 2026 11:24:11 +0100 Subject: [PATCH 03/15] fix(catalogue): an option's example only beside a default that is a word; controls check environment and scorer --- .../catalogue/agents/jiuwenswarm/agent.json | 1 - .../catalogue/benchmarks/osworld1/standard.json | 1 - .../catalogue/benchmarks/tau3-bench/standard.json | 2 -- .../catalogue/benchmarks/vitabench/standard.json | 11 ++--------- app/nullius/standard/contract/definitions.py | 5 ++++- app/templates/catalogue/benchmark.html | 2 +- app/tests/test_standard_options.py | 14 ++++++++------ app/ui_tests/test_agents.py | 2 +- app/ui_tests/test_catalogue_routes.py | 3 ++- docs/agents/supported/jiuwenswarm.md | 2 +- docs/benchmarks/supported/osworld1.md | 2 +- docs/benchmarks/supported/tau3-bench.md | 4 ++-- docs/standard.md | 2 +- 13 files changed, 23 insertions(+), 28 deletions(-) diff --git a/app/nullius/catalogue/agents/jiuwenswarm/agent.json b/app/nullius/catalogue/agents/jiuwenswarm/agent.json index 42a257bdc..9d06be658 100644 --- a/app/nullius/catalogue/agents/jiuwenswarm/agent.json +++ b/app/nullius/catalogue/agents/jiuwenswarm/agent.json @@ -94,7 +94,6 @@ "label": "Page fetch limit", "summary": "Pages fetched per invocation.", "pattern": "(?:[1-9]|[1-9][0-9]|100)", - "example": "6", "default": "3" } }, diff --git a/app/nullius/catalogue/benchmarks/osworld1/standard.json b/app/nullius/catalogue/benchmarks/osworld1/standard.json index 42b94424c..f789ded97 100644 --- a/app/nullius/catalogue/benchmarks/osworld1/standard.json +++ b/app/nullius/catalogue/benchmarks/osworld1/standard.json @@ -227,7 +227,6 @@ "label": "Pause after each action (seconds)", "summary": "Seconds to wait after each action before taking the next screenshot.", "pattern": "[0-9]{1,2}(\\.[0-9]{1,2})?", - "example": "5.0", "default": "3.0", "setups": [ "agent" diff --git a/app/nullius/catalogue/benchmarks/tau3-bench/standard.json b/app/nullius/catalogue/benchmarks/tau3-bench/standard.json index c4f6ae5ec..0af50edf6 100644 --- a/app/nullius/catalogue/benchmarks/tau3-bench/standard.json +++ b/app/nullius/catalogue/benchmarks/tau3-bench/standard.json @@ -320,7 +320,6 @@ ], "default": "200", "pattern": "[1-9][0-9]?|1[0-9]{2}|200", - "example": "100", "limit": true }, "max_errors": { @@ -332,7 +331,6 @@ ], "default": "10", "pattern": "[1-9][0-9]{0,3}", - "example": "5", "limit": true }, "upstream_agent": { diff --git a/app/nullius/catalogue/benchmarks/vitabench/standard.json b/app/nullius/catalogue/benchmarks/vitabench/standard.json index 0eaf510da..fe48b6115 100644 --- a/app/nullius/catalogue/benchmarks/vitabench/standard.json +++ b/app/nullius/catalogue/benchmarks/vitabench/standard.json @@ -192,7 +192,6 @@ ], "default": "300", "pattern": "[1-9][0-9]?|[12][0-9]{2}|300", - "example": "100", "limit": true }, "max_errors": { @@ -204,7 +203,6 @@ ], "default": "10", "pattern": "[1-9][0-9]{0,3}", - "example": "5", "limit": true }, "upstream_agent": { @@ -241,11 +239,7 @@ "values": [ "off", "on" - ], - "about": { - "off": "The upstream's default: no reasoning effort sent. On a Claude model, thinking is turned off.", - "on": "Sends the reasoning effort below. On Claude and DeepSeek models, earlier reasoning is sent back." - } + ] }, "agent_reasoning_effort": { "summary": "How much reasoning the benchmark's own agent model uses.", @@ -276,8 +270,7 @@ "original" ], "default": "0.0", - "pattern": "[0-9]+(\\.[0-9]+)?", - "example": "0.7" + "pattern": "[0-9]+(\\.[0-9]+)?" }, "agent_max_tokens": { "summary": "The longest reply of the benchmark's own agent model. The default sends no limit.", diff --git a/app/nullius/standard/contract/definitions.py b/app/nullius/standard/contract/definitions.py index 0e88acd3b..0b041d2a1 100644 --- a/app/nullius/standard/contract/definitions.py +++ b/app/nullius/standard/contract/definitions.py @@ -128,6 +128,7 @@ _ID = re.compile(r"^[A-Za-z0-9][A-Za-z0-9_.-]{0,63}$") _TAG = re.compile(r"^[A-Za-z0-9][A-Za-z0-9._+/-]{0,127}$") _COMMIT = re.compile(r"^[0-9a-f]{40}$") +_NUMBER = re.compile(r"^-?[0-9]+(?:\.[0-9]+)?$") # a default that shows the form of its own input _SHA256 = re.compile(r"^[0-9a-f]{64}$") _HTTPS = re.compile(r"^https://[A-Za-z0-9.-]+(?:/[A-Za-z0-9_.%@+-]+)+$") _RELATIVE = re.compile(r"^[A-Za-z0-9_-][A-Za-z0-9_.-]*(?:/[A-Za-z0-9_-][A-Za-z0-9_.-]*)*$") @@ -514,7 +515,9 @@ def _options(d: dict) -> List[str]: except re.error: bad.append(f"{w}.pattern: a regular expression") continue - if "example" in o and (option_problem(o, o["example"]) or o["example"] == o.get("default")): + if "example" in o and _NUMBER.match(str(o.get("default"))): + bad.append(f"{w}.example: only when its default is a word, not a number") + elif "example" in o and (option_problem(o, o["example"]) or o["example"] == o.get("default")): 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") diff --git a/app/templates/catalogue/benchmark.html b/app/templates/catalogue/benchmark.html index 1a6b943f5..1e1958ba7 100644 --- a/app/templates/catalogue/benchmark.html +++ b/app/templates/catalogue/benchmark.html @@ -58,7 +58,7 @@ {#- One version's proofs: its pin, each dataset's checks, and the form that runs them on it. -#} {% macro proofs(s) -%} {% if s.upstream.repository %}

{{ s.upstream.repository|replace('https://github.com/', '') }} @ {% if s.upstream.tag %}{{ s.upstream.tag }} · {% elif s.upstream.branch %}{{ s.upstream.branch }} · {% endif %}{{ s.upstream.tested[:7] }}

{% endif %} -

Null and reference controls check the scorer; stability and leak checks validate the tasks.

+

Null and reference controls check each task's environment and scorer; stability and leak checks, the tasks themselves.

diff --git a/app/tests/test_standard_options.py b/app/tests/test_standard_options.py index 3ad12f39d..b0dab8e15 100644 --- a/app/tests/test_standard_options.py +++ b/app/tests/test_standard_options.py @@ -43,22 +43,24 @@ def test_values_or_a_pattern_and_plain_words_only(self): self.assertIn("options.effort: values or pattern, one of them", both) quote = definitions.problems(agent(options={"effort": dict(EFFORT, values=["low", 'x"; rm', "medium"])}), "agent") self.assertIn("options.effort.values: distinct plain words", quote) - pattern = {"summary": "s", "pattern": "^[0-9]{1,3}$", "default": "40", "example": "16"} + pattern = {"summary": "s", "pattern": "^[0-9]{1,3}$", "default": "40"} self.assertEqual(definitions.problems(agent(options={"effort": pattern}), "agent"), []) self.assertTrue(definitions.problems(agent(options={"effort": dict(pattern, default="x")}), "agent")) - def test_a_pattern_carries_an_example_it_allows(self): - pattern = {"summary": "s", "pattern": "^[0-9]{1,3}$", "default": "40"} + def test_an_example_only_beside_a_default_that_is_a_word(self): + pattern = {"summary": "s", "pattern": "^(default|[0-9]{1,3})$", "default": "default", "example": "16"} self.assertEqual(definitions.problems(agent(options={"effort": pattern}), "agent"), []) - for example in (16, "x", "1234", "40"): + self.assertIn("options.effort.example: only when its default is a word, not a number", + definitions.problems(agent(options={"effort": dict(pattern, default="40")}), "agent")) + for example in (16, "x", "1234", "default"): o = dict(pattern, example=example) self.assertIn("options.effort.example: a value its pattern allows besides its default, shown in its place", definitions.problems(agent(options={"effort": o}), "agent")) - def test_every_bundled_pattern_carries_an_example(self): + def test_every_bundled_pattern_without_a_number_default_carries_an_example(self): for kind in ("benchmark", "agent", "capability"): for d in definitions.load(kind, root=definitions.CATALOGUE, every=True)[0]: for n, o in (d.get("options") or {}).items(): - self.assertTrue("pattern" not in o or "example" in o, f"{d['_ref']} {n}") + self.assertTrue("pattern" not in o or "example" in o or definitions._NUMBER.match(str(o.get("default"))), f"{d['_ref']} {n}") def test_a_name_and_a_summary(self): bad = definitions.problems(agent(options={"Effort": dict(EFFORT), "effort": dict(EFFORT, summary="")}), "agent") diff --git a/app/ui_tests/test_agents.py b/app/ui_tests/test_agents.py index 66833375f..449c43acd 100644 --- a/app/ui_tests/test_agents.py +++ b/app/ui_tests/test_agents.py @@ -316,7 +316,7 @@ def test_an_option_with_a_pattern_shows_its_example_not_the_pattern(self): root = self.tmp / "catalogue" shutil.copytree(ROOT, root) path = root / "agents" / "fake" / "agent.json" - path.write_text(json.dumps(dict(json.loads(path.read_text()), options={"turns": {"summary": "Turns.", "pattern": "[1-9][0-9]{0,2}", "example": "40", "default": "10"}}))) + path.write_text(json.dumps(dict(json.loads(path.read_text()), options={"turns": {"summary": "Turns.", "pattern": "default|[1-9][0-9]{0,2}", "example": "40", "default": "default"}}))) self.stack.enter_context(patch.object(definitions, "load", lambda kind, root_=None, every=False: _LOAD(kind, str(root), every=every))) self.stack.enter_context(patch.object(definitions, "get", lambda kind, key, root_=None: _GET(kind, key, str(root)))) html = self.get("/agents/fake").get_data(as_text=True) diff --git a/app/ui_tests/test_catalogue_routes.py b/app/ui_tests/test_catalogue_routes.py index 312b1e49e..1ff69a8f1 100644 --- a/app/ui_tests/test_catalogue_routes.py +++ b/app/ui_tests/test_catalogue_routes.py @@ -251,8 +251,9 @@ def test_an_option_with_a_pattern_shows_its_example_not_the_pattern(self): for key in ("osworld2", "gsm8k", "humaneval", "gaia", "osworld1", "tau3-bench"): html, opts = self.page_html(key), json.loads((Path(catalog.__file__).parent / "benchmarks" / key / "standard.json").read_text())["options"] for o in opts.values(): - if "pattern" in o: + if "example" in o: self.assertIn("e.g. %s" % o["example"], html) + if "pattern" in o: self.assertNotIn(o["pattern"], unescape(html)) self.assertNotIn("Provider default", self.page("osworld1")) diff --git a/docs/agents/supported/jiuwenswarm.md b/docs/agents/supported/jiuwenswarm.md index 861ef6122..9d17bb1af 100644 --- a/docs/agents/supported/jiuwenswarm.md +++ b/docs/agents/supported/jiuwenswarm.md @@ -31,7 +31,7 @@ openJiuwen's WorkSwarm agent. | Option | Values, default in bold | What it sets | Versions | |---|---|---|---| | `reasoning_effort` | **`default`**, `off`, `minimal`, `low`, `medium`, `high`, `xhigh`, `max` | How much reasoning the model uses before answering, with `default` leaving the choice to the provider. | every version | -| `web_max_fetches` | e.g. `6`, default `3` | Pages fetched per invocation. | `jiuwenswarm@0.2.9` | +| `web_max_fetches` | default `3` | Pages fetched per invocation. | `jiuwenswarm@0.2.9` | ## Benchmarks it fits diff --git a/docs/benchmarks/supported/osworld1.md b/docs/benchmarks/supported/osworld1.md index 2f522674d..f6bcbbacf 100644 --- a/docs/benchmarks/supported/osworld1.md +++ b/docs/benchmarks/supported/osworld1.md @@ -42,7 +42,7 @@ Open-ended tasks on a real Ubuntu desktop and its applications, each in a VM of |---|---|---|---| | `agent` | **`m3` (M3 Agent)**, `prompt` (PromptAgent), `claude` (Claude computer use), `gpt54` (GPT-5.4), `openai_cua` (OpenAI CUA), `qwen` (Qwen), `os_symphony` (OS-Symphony), `evocua` (EvoCUA), `autoglm` (AutoGLM), `autoglm_v` (AutoGLM-V), `mano` (Mano), `muse_spark` (Muse Spark) | Which of OSWorld's own agents runs: each its script as published, with its own prompts, action format and step limit. | `original`, `model` | | `max_steps` | e.g. `50`, default `default` | The most actions per task. default: each OSWorld agent script's own documented invocation; 100 through the computer port. | `original`, `model`, `yours` | -| `pause` | e.g. `5.0`, default `3.0` | Seconds to wait after each action before taking the next screenshot. | `agent` | +| `pause` | default `3.0` | Seconds to wait after each action before taking the next screenshot. | `agent` | | `thinking` | **`adaptive`**, `off` | M3_THINKING_MODE: adaptive, as run_multienv_m3.py's own documented invocation exports it (the model decides whether to think; temperature 1, no top_p), or off, the agent's code default when the variable is unset. | `original`, `model` | | `vm_provider` | **`docker`** | --provider_name: where the task's VM runs. docker only: the upstream's other providers need cloud accounts or a hypervisor of their own. | `original`, `model`, `yours` | diff --git a/docs/benchmarks/supported/tau3-bench.md b/docs/benchmarks/supported/tau3-bench.md index 2c852e82f..ab0135a16 100644 --- a/docs/benchmarks/supported/tau3-bench.md +++ b/docs/benchmarks/supported/tau3-bench.md @@ -39,8 +39,8 @@ Customer service with domain tools and a simulated user: airline, retail, teleco | Option | Values, default in bold | What it sets | Setups | |---|---|---|---| | `agent_reasoning_effort` | **`default`**, `none`, `minimal`, `low`, `medium`, `high`, `xhigh` | How much reasoning the benchmark's own agent model uses, with `default` keeping the upstream settings. | `original` | -| `max_errors` | e.g. `5`, default `10` | The upstream's --max-errors: the most tool calls that fail before a conversation ends. 10, its default, is the leaderboard's. | `original`, `yours` | -| `max_steps` | e.g. `100`, default `200` | The upstream's --max-steps: the most messages and tool calls of a conversation, the user's and the agent's together, at most 200: its default, the leaderboard's, which limits.turns leaves the one met. | `original`, `yours` | +| `max_errors` | default `10` | The upstream's --max-errors: the most tool calls that fail before a conversation ends. 10, its default, is the leaderboard's. | `original`, `yours` | +| `max_steps` | default `200` | The upstream's --max-steps: the most messages and tool calls of a conversation, the user's and the agent's together, at most 200: its default, the leaderboard's, which limits.turns leaves the one met. | `original`, `yours` | | `retrieval` | **`bm25`**, `bm25_grep`, `grep_only`, `no_knowledge`, `full_kb`, `golden_retrieval`, `openai_embeddings`, `openai_embeddings_grep`, `alltools`, `terminal_use`, `terminal_use_write`, `bm25_reranker`, `bm25_reranker_grep`, `openai_embeddings_reranker`, `openai_embeddings_reranker_grep`, `qwen_embeddings`, `qwen_embeddings_grep`, `qwen_embeddings_reranker`, `qwen_embeddings_reranker_grep`, `alltools-qwen` | How the agent searches the bank's documents in banking_knowledge tasks. | `original`, `yours` | | `task_split` | **`base`**, `train`, `test`, `small`, `full` | Which group of tasks to run within the selected domain. | `original`, `yours` | | `upstream_agent` | **`llm_agent`**, `llm_agent_gt`, `llm_agent_solo` | Whether the benchmark's own agent runs normally, receives the reference actions, or works alone with the user's tools. | `original` | diff --git a/docs/standard.md b/docs/standard.md index 6b0339053..9c6c96d50 100644 --- a/docs/standard.md +++ b/docs/standard.md @@ -486,7 +486,7 @@ The upstream's dependencies go in `driver.install` (a capability's `install` is | Key of an option | Meaning | | --- | --- | -| `summary`, `values` or `pattern`, `example`, `default` | What it changes, its allowed choices or input pattern, and its value when unset. `example`, optional and checked when given, is a value the pattern allows besides the default | +| `summary`, `values` or `pattern`, `example`, `default` | What it changes, its allowed choices or input pattern, and its value when unset. `example`, only beside a default that is a word, is a value the pattern allows besides it | | `datasets` | The datasets it applies to | | `about` | A line about each value | | `names` | A name for some values, shown in their place; a recipe and the CLI keep the value | From 8098e8553e1cb4586626aef44c1766d30f1de22b Mon Sep 17 00:00:00 2001 From: Etienne Filhol Date: Thu, 26 Nov 2026 12:03:29 +0100 Subject: [PATCH 04/15] docs(catalogue): VitaBench's limitations drop the agent's empty message and say what a failed judge does --- app/nullius/catalogue/benchmarks/vitabench/benchmark.json | 3 +-- docs/benchmarks/supported/vitabench.md | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/app/nullius/catalogue/benchmarks/vitabench/benchmark.json b/app/nullius/catalogue/benchmarks/vitabench/benchmark.json index 52654a0a3..ca44d2eb2 100644 --- a/app/nullius/catalogue/benchmarks/vitabench/benchmark.json +++ b/app/nullius/catalogue/benchmarks/vitabench/benchmark.json @@ -24,8 +24,7 @@ ], "limitations": [ "Another agent gets the upstream's prompt plus two lines from Nullius: where its tools are, and that its last message in a turn goes to the user.", - "With another agent, a judge that fails is the task's error: the upstream's restart of the conversation is not followed.", - "With another agent, one empty final message ends the conversation. The upstream asks its own agent 3 times." + "With another agent, a judge call that fails gives the task an error, not a score. With its own agent, VitaBench plays the whole task again instead." ], "datasets": [ { diff --git a/docs/benchmarks/supported/vitabench.md b/docs/benchmarks/supported/vitabench.md index 07076449a..a3f64c6fb 100644 --- a/docs/benchmarks/supported/vitabench.md +++ b/docs/benchmarks/supported/vitabench.md @@ -66,8 +66,7 @@ Food delivery, in-store and travel requests from a simulated user, with up to 66 ## Nullius limitations - Another agent gets the upstream's prompt plus two lines from Nullius: where its tools are, and that its last message in a turn goes to the user. -- With another agent, a judge that fails is the task's error: the upstream's restart of the conversation is not followed. -- With another agent, one empty final message ends the conversation. The upstream asks its own agent 3 times. +- With another agent, a judge call that fails gives the task an error, not a score. With its own agent, VitaBench plays the whole task again instead. ## Cite From 43d8b200999caa24503a3fb5e753f6d73c15664e Mon Sep 17 00:00:00 2001 From: Etienne Filhol Date: Thu, 26 Nov 2026 13:28:15 +0100 Subject: [PATCH 05/15] fix(standard): a retired judge is never a run's default; VitaBench names its judge --- .../catalogue/benchmarks/vitabench/benchmark.json | 2 +- .../catalogue/benchmarks/vitabench/standard.json | 1 + app/nullius/standard/contract/definitions.py | 2 ++ app/nullius/standard/pages/recipe.py | 3 +++ app/nullius/standard/runner/run.py | 2 ++ app/static/builder/command-builder.js | 4 ++-- app/tests/test_standard_controls.py | 10 ++++++++++ app/tests/test_standard_setups.py | 2 ++ docs/benchmarks/supported/vitabench.md | 2 +- docs/standard.md | 2 +- 10 files changed, 25 insertions(+), 5 deletions(-) diff --git a/app/nullius/catalogue/benchmarks/vitabench/benchmark.json b/app/nullius/catalogue/benchmarks/vitabench/benchmark.json index ca44d2eb2..07a10e24e 100644 --- a/app/nullius/catalogue/benchmarks/vitabench/benchmark.json +++ b/app/nullius/catalogue/benchmarks/vitabench/benchmark.json @@ -9,12 +9,12 @@ ], "origin": "official", "good_to_know": [ - "The paper's judge, Claude 3.7 Sonnet, is retired, so Like the paper cannot run: choose Any of your choice and a judge model. Scores compare only between runs with the same judge, never with the paper's.", "Scores depend on the judge's and the simulated user's models: keep both fixed when comparing.", "The leaderboard's main result is Cross-scenario (Chinese), with 4 attempts per task.", "A task passes only when every rubric is met." ], "upstream_limitations": [ + "The paper's judge, Claude 3.7 Sonnet, is retired, so Like the paper cannot run: every run names its judge model. Scores compare only between runs with the same judge, never with the paper's.", "In 15 of the 100 Cross-scenario (English) tasks, the shops, orders or bookings the task relies on are missing, though the Chinese version has them: an agent may fail them through no fault of its own. Score with the Chinese datasets.", "Its model calls carry configuration fields (base_url, headers, name, max_input_tokens) that OpenAI's API refuses with HTTP 400: run every model of a VitaBench run on OpenRouter (OpenAI's models are there as openai/...) or a custom endpoint.", "A failed model call makes the upstream start the conversation again, up to 3 times, and each costs its calls.", diff --git a/app/nullius/catalogue/benchmarks/vitabench/standard.json b/app/nullius/catalogue/benchmarks/vitabench/standard.json index fe48b6115..9961c79f1 100644 --- a/app/nullius/catalogue/benchmarks/vitabench/standard.json +++ b/app/nullius/catalogue/benchmarks/vitabench/standard.json @@ -113,6 +113,7 @@ "says": "the upstream's evaluator: the judge reads the conversation in sliding windows of 10 messages, 2 of them overlapping, and marks each rubric; the task passes when every rubric is met. A conversation that reaches the step or error limit, or ends on an empty agent message, scores 0 without the judge.", "judge": { "model": "claude-3.7-sonnet", + "retired": true, "says": "the paper's evaluator, at temperature 0 and without thinking; the updated leaderboard does not name its evaluator" } }, diff --git a/app/nullius/standard/contract/definitions.py b/app/nullius/standard/contract/definitions.py index 0b041d2a1..ff226cb5a 100644 --- a/app/nullius/standard/contract/definitions.py +++ b/app/nullius/standard/contract/definitions.py @@ -1656,6 +1656,8 @@ def problems(d: dict, kind: str) -> List[str]: j = s.get("judge") if j is not None and (not isinstance(j, dict) or not _MODEL_NAME.match(str(j.get("model", ""))) or not j.get("says")): bad.append("score.judge: {model: the official judge, as the provider names it; says: what it is asked}") + elif j is not None and not isinstance(j.get("retired", False), bool): + bad.append("score.judge.retired: true when the official judge can no longer be called") sim = d.get("simulator") if sim is not None: if not isinstance(sim, dict) or not _MODEL_NAME.match(str(sim.get("model", ""))) or not sim.get("says"): diff --git a/app/nullius/standard/pages/recipe.py b/app/nullius/standard/pages/recipe.py index caa680c9d..bb50dcc22 100644 --- a/app/nullius/standard/pages/recipe.py +++ b/app/nullius/standard/pages/recipe.py @@ -184,6 +184,7 @@ def _bench_page(b: dict) -> dict: for k, x in (b.get("setups") or {}).items() if k == "original"], # its own options (a search, a mode): each value with its line and what it needs; and the host requirements "simulator": (b.get("simulator") or {}).get("model", ""), "judge": ((b.get("score") or {}).get("judge") or {}).get("model", ""), + "judge_retired": bool(((b.get("score") or {}).get("judge") or {}).get("retired")), # what the upstream's leaderboard fixes besides the ranked model (Like the leaderboard) "leaderboard": b.get("leaderboard") or None, "attempts": (b.get("limits") or {}).get("attempts", ""), @@ -629,6 +630,8 @@ def add(step, message, shown=False, field=None, unset=False): add("model", f"Enter {what} model as the provider lists it, or leave it empty for its official one.") elif m and like and m not in (fixed[role], providers.served_as(fixed[role], provider_)): add("model", f"{like} uses {what} model {fixed[role]}: choose Any of your choice for {m}.") + if ((b.get("score") or {}).get("judge") or {}).get("retired") and not judge_model and not like: + add("model", f"{b['label']}'s official judge, {official['judge']}, is retired: enter a model for the judge.") # the leaderboard's own models, as the run's provider spells them; the official ones stay the run's default sim_model = providers.served_as(lb["simulator"], provider_) if lb.get("simulator") else sim_model judge_model = providers.served_as(lb["judge"], provider_) if lb.get("judge") else judge_model diff --git a/app/nullius/standard/runner/run.py b/app/nullius/standard/runner/run.py index 26a638de4..517da971b 100644 --- a/app/nullius/standard/runner/run.py +++ b/app/nullius/standard/runner/run.py @@ -877,6 +877,8 @@ def __init__(self, bench: dict, other: dict, *, model: str, provider: str, datas # on a route of their own (-judge), recorded beside the unit's and never counted as the agent's. # The official one is written as its maker spells it; the run's provider may spell it otherwise. j = (bench.get("score") or {}).get("judge") + if j and j.get("retired") and not judge_model: + raise Refused(f"{bench.get('label') or bench['key']}'s official judge, {j['model']}, is retired: name another with --judge-model") self.judge_model = (judge_model or providers.served_as(j["model"], provider)) if j else None # A benchmark whose user a model plays: its driver's turns ask that model the same way, on -simulator. # A control holds no conversation, so it never asks it. diff --git a/app/static/builder/command-builder.js b/app/static/builder/command-builder.js index 754cd1f5a..606bf1d9f 100644 --- a/app/static/builder/command-builder.js +++ b/app/static/builder/command-builder.js @@ -783,8 +783,8 @@ // unless named; like the paper, the official one; like the leaderboard, its own and the options it fixes + (b.simulator ? (paper ? fixed('Model for the user simulator', lb && lb.simulator || b.simulator, lb && lb.simulator ? 'leaderboard' : 'official') : field('Model for the user simulator', 'simulator_model', rec.simulator_model || '', {list: 'nb-models', placeholder: b.simulator + ' (official)', hint: 'Plays the user in every conversation. Empty: ' + esc(b.label) + "'s official one; another compares only with runs that used it."})) + servedField(rec, 'simulator') : '') - + (b.judge ? (paper ? fixed('Model for the judge', lb && lb.judge || b.judge, lb && lb.judge ? 'leaderboard' : 'official') : field('Model for the judge', 'judge_model', rec.judge_model || '', {list: 'nb-models', placeholder: b.judge + ' (official)', - hint: 'Grades the answers. Empty: ' + esc(b.label) + "'s official judge; another compares only with runs that used it."})) + servedField(rec, 'judge') : '') + + (b.judge ? (paper ? fixed('Model for the judge', lb && lb.judge || b.judge, lb && lb.judge ? 'leaderboard' : 'official') : field('Model for the judge', 'judge_model', rec.judge_model || '', {list: 'nb-models', placeholder: b.judge_retired ? 'Search or enter a model ID' : b.judge + ' (official)', + hint: b.judge_retired ? 'Grades the answers.' : 'Grades the answers. Empty: ' + esc(b.label) + "'s official judge; another compares only with runs that used it."})) + servedField(rec, 'judge') : '') + (lb ? Object.entries(lb.bench_options || {}).map(([k, v]) => fixed((b.options[k] || {}).label || k, ((b.options[k] || {}).names || {})[v] || v, 'leaderboard')).join('') : '') + keyLine(rec); } diff --git a/app/tests/test_standard_controls.py b/app/tests/test_standard_controls.py index 53cb9e5b0..e357a6f5d 100644 --- a/app/tests/test_standard_controls.py +++ b/app/tests/test_standard_controls.py @@ -169,6 +169,16 @@ def test_a_judged_benchmarks_control_still_needs_the_judges_key(self): with self.assertRaises(run.Refused): run.Run(b, definitions.control(b, "nop"), model="", provider="openai", env={}) + def test_a_retired_judge_is_never_the_default(self): + b = kit("agent-task-v1", os.path.join(self.tmp, "kits")) + b["score"] = dict(b["score"], judge={"model": "judge-1", "says": "x", "retired": True}) + env = {"OPENAI_API_KEY": "k"} + with self.assertRaises(run.Refused) as e: + run.Run(b, definitions.control(b, "nop"), model="", provider="openai", env=env) + self.assertIn("judge-1, is retired: name another with --judge-model", str(e.exception)) + self.assertEqual(run.Run(b, definitions.control(b, "nop"), model="", provider="openai", env=env, + judge_model="judge-2").judge_model, "judge-2") + def test_a_standard_job_named_oracle_without_the_record_is_no_control(self): j = parse.parse_job(self.go("agent-task-v1", "oracle")) with open(os.path.join(j.dir, "config.json")) as f: diff --git a/app/tests/test_standard_setups.py b/app/tests/test_standard_setups.py index c2dc6078f..19fd59b97 100644 --- a/app/tests/test_standard_setups.py +++ b/app/tests/test_standard_setups.py @@ -354,6 +354,8 @@ def test_a_retired_judge_refuses_like_the_paper_and_leaves_any_model(self): vita = dict(benchmark="vitabench", datasets=["cross"], others=["original"], provider="openrouter", model="vendor/m") said = " ".join(e["message"] for e in self.compiled(**vita, model_choice="paper")["errors"]) self.assertIn("Paper models unavailable", said) + said = " ".join(e["message"] for e in self.compiled(**vita, model_choice="any")["errors"]) + self.assertIn("claude-3.7-sonnet, is retired: enter a model for the judge", said) out = self.compiled(**vita, model_choice="any", judge_model="vendor/judge") self.assertEqual(out["errors"], []) self.assertIn("run vitabench original --model vendor/m", out["script"]) diff --git a/docs/benchmarks/supported/vitabench.md b/docs/benchmarks/supported/vitabench.md index a3f64c6fb..4ba9402a4 100644 --- a/docs/benchmarks/supported/vitabench.md +++ b/docs/benchmarks/supported/vitabench.md @@ -49,13 +49,13 @@ Food delivery, in-store and travel requests from a simulated user, with up to 66 ## Good to know -- The paper's judge, Claude 3.7 Sonnet, is retired, so Like the paper cannot run: choose Any of your choice and a judge model. Scores compare only between runs with the same judge, never with the paper's. - Scores depend on the judge's and the simulated user's models: keep both fixed when comparing. - The leaderboard's main result is Cross-scenario (Chinese), with 4 attempts per task. - A task passes only when every rubric is met. ## Upstream limitations +- The paper's judge, Claude 3.7 Sonnet, is retired, so Like the paper cannot run: every run names its judge model. Scores compare only between runs with the same judge, never with the paper's. - In 15 of the 100 Cross-scenario (English) tasks, the shops, orders or bookings the task relies on are missing, though the Chinese version has them: an agent may fail them through no fault of its own. Score with the Chinese datasets. - Its model calls carry configuration fields (base_url, headers, name, max_input_tokens) that OpenAI's API refuses with HTTP 400: run every model of a VitaBench run on OpenRouter (OpenAI's models are there as openai/...) or a custom endpoint. - A failed model call makes the upstream start the conversation again, up to 3 times, and each costs its calls. diff --git a/docs/standard.md b/docs/standard.md index 9c6c96d50..9da0f8138 100644 --- a/docs/standard.md +++ b/docs/standard.md @@ -441,7 +441,7 @@ An `answer` or `score` error that begins `EnvironmentSetupError: `, `VerifierErr | Field in `standard.json` | Meaning | | --- | --- | | `gated` | `true` for a benchmark whose tasks are gated: a unit's failing model endpoint (the agent's, the judge's, the simulated user's) is kept as its status and class, never the provider's words | -| `score.judge` | `{model, says}`: the official judge. Its route (`-judge`) is asked as that model, recorded beside the unit's calls, never as the agent's. `cli run --judge-model` asks another | +| `score.judge` | `{model, says, retired?}`: the official judge. Its route (`-judge`) is asked as that model, recorded beside the unit's calls, never as the agent's. `cli run --judge-model` asks another. `retired: true`: no default, a run without `--judge-model` is refused | | `simulator` | `{model, says}`, 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** | | `limits.turns` | At most this many agent turns in a conversation (default 20; `cli run --max-turns` forces another) | From 96b48ee29fa5c82b687a74eae10bfe84dce63318 Mon Sep 17 00:00:00 2001 From: Etienne Filhol Date: Fri, 27 Nov 2026 00:37:01 +0100 Subject: [PATCH 06/15] fix(standard): an official model a provider lists under another name; gpt-4.1 on OpenRouter --- .../catalogue/benchmarks/tau3-bench/standard.json | 2 ++ .../catalogue/benchmarks/vitabench/standard.json | 1 + app/nullius/providers.py | 7 +++++++ app/nullius/standard/cli.py | 4 ++-- app/nullius/standard/contract/definitions.py | 14 ++++++++++++++ app/nullius/standard/pages/recipe.py | 12 +++++++----- app/nullius/standard/runner/run.py | 4 ++-- app/tests/test_providers.py | 7 +++++++ app/tests/test_standard_run.py | 3 +++ docs/standard.md | 4 ++-- 10 files changed, 47 insertions(+), 11 deletions(-) diff --git a/app/nullius/catalogue/benchmarks/tau3-bench/standard.json b/app/nullius/catalogue/benchmarks/tau3-bench/standard.json index 0af50edf6..c525cfa29 100644 --- a/app/nullius/catalogue/benchmarks/tau3-bench/standard.json +++ b/app/nullius/catalogue/benchmarks/tau3-bench/standard.json @@ -84,6 +84,7 @@ }, "simulator": { "model": "gpt-4.1-2025-04-14", + "served_as": {"openrouter": "openai/gpt-4.1"}, "says": "the customer: the upstream's own user simulator, built by its build_text_orchestrator (its guidelines and the task's scenario), its default model at its default arguments (temperature 0)" }, "leaderboard": { @@ -109,6 +110,7 @@ "says": "the upstream's own batch runner, run_tasks, on the task: its Orchestrator holds the conversation by its rules (max steps 200 and max errors 10 unless the run sets lower or other ones, the user's stop) at the trial's seed run_tasks draws, an attempt that raises is made again (3 retries) and the last recorded INFRASTRUCTURE_ERROR, which is the unit's error, never a score; its evaluator (evaluate_simulation, ALL) scores the SimulationRun the Orchestrator returns: 0 unless the user ended it (the upstream's agent never does); else the product of the task's reward_basis - the database after the agent's calls, replayed by the upstream's environment, hashes as after the gold actions (DB), each required fact is in one of the agent's messages (COMMUNICATE), the judge finds each NL assertion met (NL_ASSERTION)", "judge": { "model": "gpt-4.1-2025-04-14", + "served_as": {"openrouter": "openai/gpt-4.1"}, "says": "the upstream's NL-assertion evaluator (evaluator_nl_assertions.py, its prompt, its call and its own model name), reached through the judge's route, at temperature 0, asked only for a task whose reward_basis names NL_ASSERTION and that has assertions" } }, diff --git a/app/nullius/catalogue/benchmarks/vitabench/standard.json b/app/nullius/catalogue/benchmarks/vitabench/standard.json index 9961c79f1..21aa69232 100644 --- a/app/nullius/catalogue/benchmarks/vitabench/standard.json +++ b/app/nullius/catalogue/benchmarks/vitabench/standard.json @@ -100,6 +100,7 @@ }, "simulator": { "model": "gpt-4.1-2025-04-14", + "served_as": {"openrouter": "openai/gpt-4.1"}, "says": "the user: the upstream's own user simulator, with the paper's model, at temperature 0" }, "controls": { diff --git a/app/nullius/providers.py b/app/nullius/providers.py index 1d577553e..8c2c9025a 100644 --- a/app/nullius/providers.py +++ b/app/nullius/providers.py @@ -312,6 +312,13 @@ def served_as(model: str, provider: str) -> str: return model +def official_as(spec: dict, provider: str) -> str: + """A benchmark's official judge or simulated user ({model, served_as?}) as ``provider`` serves it: + its own name there when the definition gives one (OpenRouter serves gpt-4.1-2025-04-14 as + openai/gpt-4.1), else ``served_as``.""" + return (spec.get("served_as") or {}).get(provider) or served_as(spec["model"], provider) + + def available(env=os.environ) -> List[str]: """The choices whose setting is set (``needs``), in the order the builder prefers them: OpenRouter, OpenAI, Anthropic, then each custom provider.""" diff --git a/app/nullius/standard/cli.py b/app/nullius/standard/cli.py index 52a76db0d..17feffa13 100644 --- a/app/nullius/standard/cli.py +++ b/app/nullius/standard/cli.py @@ -668,8 +668,8 @@ def _boat_units(a, b, other) -> int: words += ["--" + field.replace("_", "-"), value] # Saved price overrides belong to the launching profile, not the fresh VM. needs = definitions.option_needs(b, vals) - models = [a.model, other.get("sent"), a.judge_model or providers.served_as((b.get("score", {}).get("judge") or {}).get("model", ""), a.provider), - a.simulator_model or providers.served_as((b.get("simulator") or {}).get("model", ""), a.provider), + models = [a.model, other.get("sent"), a.judge_model or providers.official_as((b.get("score", {}).get("judge") or {"model": ""}), a.provider), + a.simulator_model or providers.official_as((b.get("simulator") or {"model": ""}), a.provider), *[providers.served_as(m, a.provider) for m in needs["embeddings"] + needs["reranker"]]] explicit = prices(a.price) for model, row in price_list.given(models, price_list.table()).items(): diff --git a/app/nullius/standard/contract/definitions.py b/app/nullius/standard/contract/definitions.py index ff226cb5a..0f5cf4133 100644 --- a/app/nullius/standard/contract/definitions.py +++ b/app/nullius/standard/contract/definitions.py @@ -1658,12 +1658,14 @@ def problems(d: dict, kind: str) -> List[str]: bad.append("score.judge: {model: the official judge, as the provider names it; says: what it is asked}") elif j is not None and not isinstance(j.get("retired", False), bool): bad.append("score.judge.retired: true when the official judge can no longer be called") + bad += _served_as("score.judge", j) sim = d.get("simulator") if sim is not None: if not isinstance(sim, dict) or not _MODEL_NAME.match(str(sim.get("model", ""))) or not sim.get("says"): bad.append("simulator: {model: the official simulated user's model, as the provider names it; says: whom it plays}") elif "agent.conversation/v1" not in (needs if isinstance(needs, list) else []): bad.append("simulator: only a benchmark that needs agent.conversation/v1 has a user to simulate") + bad += _served_as("simulator", sim) bad += _controls(d.get("controls")) bad += _leaderboard(d) bad += _setups(d.get("setups")) @@ -1901,6 +1903,18 @@ def skills_shown(port: str, record: Optional[dict]) -> List[str]: return list(port_skills(port)) if on_current_kit(port, record) else [] + +def _served_as(w: str, spec) -> List[str]: + """An official judge's or simulated user's ``served_as``: {provider: the name that provider serves it as}.""" + sa = spec.get("served_as") if isinstance(spec, dict) else None + if sa is None: + return [] + from nullius.providers import PROVIDERS + if not isinstance(sa, dict) or not sa or any(p not in PROVIDERS or not _MODEL_NAME.match(str(m)) + for p, m in sa.items()): + return [f"{w}.served_as: {{provider: the name it serves the model as}}"] + return [] + def _skills(d: dict) -> List[str]: """A kit's ``basic`` and ``skills``, a benchmark's ``needs_skills``.""" bad = [] diff --git a/app/nullius/standard/pages/recipe.py b/app/nullius/standard/pages/recipe.py index bb50dcc22..9b26f6736 100644 --- a/app/nullius/standard/pages/recipe.py +++ b/app/nullius/standard/pages/recipe.py @@ -625,10 +625,12 @@ def add(step, message, shown=False, field=None, unset=False): sim_model = str(recipe.get("simulator_model") or "").strip() judge_model = str(recipe.get("judge_model") or "").strip() like = {"paper": "Like the paper", "leaderboard": "Like the leaderboard"}.get(model_choice) + spec = {"judge": (b.get("score") or {}).get("judge"), "simulator": b.get("simulator")} for what, role, m in (("the user simulator's", "simulator", sim_model), ("the judge's", "judge", judge_model)): if m and not _MODEL.match(m): add("model", f"Enter {what} model as the provider lists it, or leave it empty for its official one.") - elif m and like and m not in (fixed[role], providers.served_as(fixed[role], provider_)): + elif m and like and m not in (fixed[role], providers.served_as(fixed[role], provider_), + providers.official_as({"model": fixed[role], **({} if lb.get(role) else spec[role] or {})}, provider_)): add("model", f"{like} uses {what} model {fixed[role]}: choose Any of your choice for {m}.") if ((b.get("score") or {}).get("judge") or {}).get("retired") and not judge_model and not like: add("model", f"{b['label']}'s official judge, {official['judge']}, is retired: enter a model for the judge.") @@ -760,8 +762,8 @@ def add(step, message, shown=False, field=None, unset=False): judge, sim = (b.get("score") or {}).get("judge"), b.get("simulator") called = [m for x in dss for p in picks for m in ledger.models( p["o"], None if p["control"] else (p["o"].get("sent") or p.get("model")) if p.get("setup") else model, - (judge_model or providers.served_as(judge["model"], provider)) if judge else None, - (sim_model or providers.served_as(sim["model"], provider)) if sim else None, + (judge_model or providers.official_as(judge, provider)) if judge else None, + (sim_model or providers.official_as(sim, provider)) if sim else None, providers.served_as((definitions.option_needs(b, per_ds[x["id"]])["embeddings"] or [""])[0], provider), control=p["control"])] called += [providers.served_as(m, provider) for m in needs["reranker"]] missing = unpriced([m for m in dict.fromkeys(called) if isinstance(m, str) and m]) @@ -777,8 +779,8 @@ def add(step, message, shown=False, field=None, unset=False): def sent_of(p: dict) -> Dict[str, Optional[str]]: """Each model field's model as job ``p`` sends it; None where it has none (a control has no model of its own).""" return {"model": None if p["control"] else (p["o"].get("sent") or p.get("model")) if p.get("setup") else model, - "judge": (judge_model or providers.served_as(judge_def["model"], provider)) if judge_def else None, - "simulator": (sim_model or providers.served_as(sim_def["model"], provider)) if sim_def else None} + "judge": (judge_model or providers.official_as(judge_def, provider)) if judge_def else None, + "simulator": (sim_model or providers.official_as(sim_def, provider)) if sim_def else None} def called_of(p: dict) -> List[str]: s = sent_of(p) diff --git a/app/nullius/standard/runner/run.py b/app/nullius/standard/runner/run.py index 517da971b..60bd7baa3 100644 --- a/app/nullius/standard/runner/run.py +++ b/app/nullius/standard/runner/run.py @@ -879,11 +879,11 @@ def __init__(self, bench: dict, other: dict, *, model: str, provider: str, datas j = (bench.get("score") or {}).get("judge") if j and j.get("retired") and not judge_model: raise Refused(f"{bench.get('label') or bench['key']}'s official judge, {j['model']}, is retired: name another with --judge-model") - self.judge_model = (judge_model or providers.served_as(j["model"], provider)) if j else None + self.judge_model = (judge_model or providers.official_as(j, provider)) if j else None # A benchmark whose user a model plays: its driver's turns ask that model the same way, on -simulator. # A control holds no conversation, so it never asks it. sim = bench.get("simulator") - self.simulator_model = (simulator_model or providers.served_as(sim["model"], provider)) if sim else None + self.simulator_model = (simulator_model or providers.official_as(sim, provider)) if sim else None # A control (definitions.control) calls no model: its run needs a key only for the benchmark's judge. ds = [d for d in bench["datasets"] if dataset in (None, d["id"])] if not ds: diff --git a/app/tests/test_providers.py b/app/tests/test_providers.py index b72b7386a..1420d5c00 100644 --- a/app/tests/test_providers.py +++ b/app/tests/test_providers.py @@ -48,6 +48,13 @@ def test_an_official_model_is_named_as_openrouter_names_it(self): ("openai/gpt-4o", "openrouter"), ("some-local-model", "openrouter")): self.assertEqual(providers.served_as(model, provider), model) + def test_an_official_model_openrouter_serves_under_another_name(self): + """OpenRouter lists gpt-4.1-2025-04-14 only as openai/gpt-4.1: the definition names it there.""" + sim = {"model": "gpt-4.1-2025-04-14", "served_as": {"openrouter": "openai/gpt-4.1"}} + self.assertEqual(providers.official_as(sim, "openrouter"), "openai/gpt-4.1") + self.assertEqual(providers.official_as(sim, "openai"), "gpt-4.1-2025-04-14") + self.assertEqual(providers.official_as({"model": "gpt-4o-2024-08-06"}, "openrouter"), "openai/gpt-4o-2024-08-06") + class Runners(unittest.TestCase): def test_the_builder_offers_harbor_and_nullius_and_says_why_another_is_gone(self): diff --git a/app/tests/test_standard_run.py b/app/tests/test_standard_run.py index dcfa6a34d..d15beb238 100644 --- a/app/tests/test_standard_run.py +++ b/app/tests/test_standard_run.py @@ -1272,6 +1272,9 @@ def test_a_simulator_is_only_for_a_conversation(self): " ".join(definitions.problems(dict(b, simulator={"model": "u", "says": "x"}), "benchmark"))) self.assertIn("simulator: {model", " ".join(definitions.problems(dict(b, simulator={"model": "a user"}), "benchmark"))) + for bad in ({"nowhere": "x/y"}, {"openrouter": "a user"}, {}): + self.assertIn("score.judge.served_as: {provider", + " ".join(definitions.problems(dict(b, score=dict(b["score"], judge={"model": "j", "says": "x", "served_as": bad})), "benchmark"))) def test_the_container_backend_needs_no_yes_but_a_usable_engine(self): from unittest import mock diff --git a/docs/standard.md b/docs/standard.md index 9da0f8138..5d20a9606 100644 --- a/docs/standard.md +++ b/docs/standard.md @@ -441,8 +441,8 @@ An `answer` or `score` error that begins `EnvironmentSetupError: `, `VerifierErr | Field in `standard.json` | Meaning | | --- | --- | | `gated` | `true` for a benchmark whose tasks are gated: a unit's failing model endpoint (the agent's, the judge's, the simulated user's) is kept as its status and class, never the provider's words | -| `score.judge` | `{model, says, retired?}`: the official judge. Its route (`-judge`) is asked as that model, recorded beside the unit's calls, never as the agent's. `cli run --judge-model` asks another. `retired: true`: no default, a run without `--judge-model` is refused | -| `simulator` | `{model, says}`, 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 | +| `score.judge` | `{model, says, retired?, served_as?}`: the official judge. Its route (`-judge`) is asked as that model, recorded beside the unit's calls, never as the agent's. `cli run --judge-model` asks another. `retired: true`: no default, a run without `--judge-model` is refused. `served_as`: `{provider: name}` where a provider lists the model under another name | +| `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** | | `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) | From 8b394c2bd4fb4a644f076a5974c0eed4456f1d1e Mon Sep 17 00:00:00 2001 From: Etienne Filhol Date: Fri, 27 Nov 2026 02:57:11 +0100 Subject: [PATCH 07/15] fix(catalogue): VitaBench counts an agent's parallel calls as one step; a control runs without a retired judge --- .../benchmarks/vitabench/benchmark.json | 2 +- .../catalogue/benchmarks/vitabench/driver.py | 41 +++++++++++++++---- app/nullius/standard/runner/run.py | 5 ++- app/tests/test_standard_controls.py | 3 +- app/tests/test_standard_vitabench.py | 26 ++++++++++++ docs/benchmarks/supported/vitabench.md | 2 +- docs/standard.md | 2 +- 7 files changed, 67 insertions(+), 14 deletions(-) diff --git a/app/nullius/catalogue/benchmarks/vitabench/benchmark.json b/app/nullius/catalogue/benchmarks/vitabench/benchmark.json index 07a10e24e..c4ce99aef 100644 --- a/app/nullius/catalogue/benchmarks/vitabench/benchmark.json +++ b/app/nullius/catalogue/benchmarks/vitabench/benchmark.json @@ -14,7 +14,7 @@ "A task passes only when every rubric is met." ], "upstream_limitations": [ - "The paper's judge, Claude 3.7 Sonnet, is retired, so Like the paper cannot run: every run names its judge model. Scores compare only between runs with the same judge, never with the paper's.", + "The paper's judge, Claude 3.7 Sonnet, is retired, so Like the paper cannot run: every agent's run names its judge model. Scores compare only between runs with the same judge, never with the paper's.", "In 15 of the 100 Cross-scenario (English) tasks, the shops, orders or bookings the task relies on are missing, though the Chinese version has them: an agent may fail them through no fault of its own. Score with the Chinese datasets.", "Its model calls carry configuration fields (base_url, headers, name, max_input_tokens) that OpenAI's API refuses with HTTP 400: run every model of a VitaBench run on OpenRouter (OpenAI's models are there as openai/...) or a custom endpoint.", "A failed model call makes the upstream start the conversation again, up to 3 times, and each costs its calls.", diff --git a/app/nullius/catalogue/benchmarks/vitabench/driver.py b/app/nullius/catalogue/benchmarks/vitabench/driver.py index 5400cc925..9075cf03d 100644 --- a/app/nullius/catalogue/benchmarks/vitabench/driver.py +++ b/app/nullius/catalogue/benchmarks/vitabench/driver.py @@ -7,8 +7,8 @@ setup - the upstream agent's own prompt (``LLMAgent.system_prompt``) and its environment's tools, served by ``mcp_server.py``, which passes each call here turn - the upstream's ``run_task`` in a thread: its Orchestrator, user simulator, - limits, retries and evaluator. The agent in it is ``AcpAgent``: a tool call made - over MCP is the agent's next message, which the Orchestrator executes; the final + limits, retries and evaluator. The agent in it is ``AcpAgent``: the tool calls made + over MCP at once are the agent's next message, which the Orchestrator executes; the final text of a turn is its next message to the user. ``turn`` answers ``done`` once the agent or the user says the upstream's stop token, or the Orchestrator ends it answer - the original: the upstream's own agent as the run's model, in the same run_task @@ -23,6 +23,7 @@ is told by ``restart``, except after it ended: an evaluator that raises is then the unit's error, the ACP agent being gone. """ +import atexit import contextlib import json import os @@ -33,6 +34,7 @@ import sys import tempfile import threading +import time import uuid PROTOCOL, sys.stdout = sys.stdout, sys.stderr # stdout is the protocol's: whatever the upstream prints goes to the log @@ -72,6 +74,7 @@ 用户说:"""} ENDED_CALL = "Error: the conversation has ended ({why}); this call was not made." RESTARTED_CALL = "Error: the conversation was started again; this call was not made." +GATHER = 0.1 # how close together calls are parallel ones WAIT = 590 # under the 600 s a turn's answer is given STATE, _TASKS = {}, {} _CURRENT = [None] # the conversation running: a driver holds one unit at a time @@ -111,11 +114,24 @@ def generate_next_message(self, message, state): if what == "call": # from an attempt before: not made value[2](RESTARTED_CALL, True) if what == "call": - name, arguments, reply = value - tc = ToolCall(id="call_" + uuid.uuid4().hex[:16], name=str(name), - arguments=arguments if isinstance(arguments, dict) else {}, requestor="assistant") - c.pending[tc.id] = reply - return AssistantMessage(role="assistant", content=None, tool_calls=[tc], cost=0.0), state + # Calls the agent made at once (within GATHER seconds) are one message, one step, as the upstream's + # agent's parallel calls are. + calls, until = [value], time.monotonic() + GATHER + while True: + with c.inbox.mutex: + while c.inbox.queue and c.inbox.queue[0][0] == "call" and c.inbox.queue[0][2] == self.attempt: + calls.append(c.inbox.queue.popleft()[1]) + other = bool(c.inbox.queue) + if other or time.monotonic() >= until: + break + time.sleep(0.005) + tcs = [] + for name, arguments, reply in calls: + tc = ToolCall(id="call_" + uuid.uuid4().hex[:16], name=str(name), + arguments=arguments if isinstance(arguments, dict) else {}, requestor="assistant") + c.pending[tc.id] = reply + tcs.append(tc) + return AssistantMessage(role="assistant", content=None, tool_calls=tcs, cost=0.0), state said = AssistantMessage(role="assistant", content=value, cost=0.0) if not said.has_text_content(): self.empty = message @@ -399,6 +415,14 @@ def answer(unit, dir, setup, model, base_url, key, simulator=None, judge=None, a def score(unit, dir, transcript, answer, judge=None, setup=None): st, t = _state(unit), task(unit) c = st["conversation"] + try: + return _scored(st, t, c, dir) + finally: + if c is not None: + c.close() + + +def _scored(st, t, c, dir): if c is None: run = st["original"] elif c.thread is None: # the null control: no message, as the upstream scores one @@ -432,10 +456,9 @@ def score(unit, dir, transcript, answer, judge=None, setup=None): os.makedirs(out, exist_ok=True) with open(os.path.join(out, "simulation.json"), "w", encoding="utf-8") as f: f.write(run.model_dump_json(indent=2)) - if c is not None: - c.close() return {"reward": info.reward, "passed": info.reward == 1.0, "detail": detail} if __name__ == "__main__": + atexit.register(_leave) # the last unit's socket folder, scored or not serve({"units": units, "setup": setup, "turn": turn, "answer": answer, "score": score}, out=PROTOCOL) diff --git a/app/nullius/standard/runner/run.py b/app/nullius/standard/runner/run.py index 60bd7baa3..e9008e458 100644 --- a/app/nullius/standard/runner/run.py +++ b/app/nullius/standard/runner/run.py @@ -877,8 +877,11 @@ def __init__(self, bench: dict, other: dict, *, model: str, provider: str, datas # on a route of their own (-judge), recorded beside the unit's and never counted as the agent's. # The official one is written as its maker spells it; the run's provider may spell it otherwise. j = (bench.get("score") or {}).get("judge") + # A retired one is never the default: an agent's run names another; a control's run without one sends none. if j and j.get("retired") and not judge_model: - raise Refused(f"{bench.get('label') or bench['key']}'s official judge, {j['model']}, is retired: name another with --judge-model") + if other.get("_kind") != "control": + raise Refused(f"{bench.get('label') or bench['key']}'s official judge, {j['model']}, is retired: name another with --judge-model") + j = None self.judge_model = (judge_model or providers.official_as(j, provider)) if j else None # A benchmark whose user a model plays: its driver's turns ask that model the same way, on -simulator. # A control holds no conversation, so it never asks it. diff --git a/app/tests/test_standard_controls.py b/app/tests/test_standard_controls.py index e357a6f5d..2ea7128e6 100644 --- a/app/tests/test_standard_controls.py +++ b/app/tests/test_standard_controls.py @@ -174,8 +174,9 @@ def test_a_retired_judge_is_never_the_default(self): b["score"] = dict(b["score"], judge={"model": "judge-1", "says": "x", "retired": True}) env = {"OPENAI_API_KEY": "k"} with self.assertRaises(run.Refused) as e: - run.Run(b, definitions.control(b, "nop"), model="", provider="openai", env=env) + run.Run(b, {"_kind": "agent", "key": "a", "label": "A"}, model="m", provider="openai", env=env, unsandboxed=True, proving=True) self.assertIn("judge-1, is retired: name another with --judge-model", str(e.exception)) + self.assertIsNone(run.Run(b, definitions.control(b, "nop"), model="", provider="openai", env={}).judge_model) self.assertEqual(run.Run(b, definitions.control(b, "nop"), model="", provider="openai", env=env, judge_model="judge-2").judge_model, "judge-2") diff --git a/app/tests/test_standard_vitabench.py b/app/tests/test_standard_vitabench.py index 9295b03fc..04ec5ca6e 100644 --- a/app/tests/test_standard_vitabench.py +++ b/app/tests/test_standard_vitabench.py @@ -110,6 +110,21 @@ def call(name, arguments): got = ask("tools/call", {"name": name, "arguments": arguments})["result"] return got["content"][0]["text"], got["isError"] + def at_once(*calls): + """Several calls sent before any answer, as an agent's parallel calls are.""" + ids = [] + for name, arguments in calls: + n[0] += 1 + ids.append(n[0]) + p.stdin.write(json.dumps({"jsonrpc": "2.0", "id": n[0], "method": "tools/call", + "params": {"name": name, "arguments": arguments}}) + "\n") + p.stdin.flush() + while ids: + m = json.loads(p.stdout.readline()) + if m.get("id") in ids: + ids.remove(m["id"]) + call.at_once = at_once + def turn(said=None): t = [] if said is None else [{"role": "user", "text": "..."}, {"role": "agent", "text": said}] return d.request("turn", unit=unit, dir=ws, transcript=t, simulator=self.route, judge=self.route) @@ -140,6 +155,17 @@ def test_the_orchestrator_executes_each_call_and_the_users_stop_ends_it(self): self.assertNotIn("window_evaluations", r["detail"]["reward_info"]) self.assertTrue(os.path.isfile(os.path.join(self.tmp, "unit", "verifier", "simulation.json"))) + def test_calls_made_at_once_are_one_step_as_the_upstreams_parallel_calls(self): + _, _, call, turn, score = self.opened("cross-en", "A0812003", ["Lunch, please.", "Thanks. ###STOP###"]) + turn() + args = {"longitude1": 1, "latitude1": 1, "longitude2": 1, "latitude2": 1} + call.at_once(("longitude_latitude_to_distance", args), ("longitude_latitude_to_distance", args)) + turn("Ordered.") + score() + with open(os.path.join(self.tmp, "unit", "verifier", "simulation.json")) as f: + said = [m for m in json.load(f)["messages"] if m["role"] == "assistant" and m.get("tool_calls")] + self.assertEqual([len(m["tool_calls"]) for m in said], [2]) + def test_ten_tool_errors_score_zero_unjudged(self): _, _, call, turn, score = self.opened("delivery", "10711001", ["你好"]) turn() diff --git a/docs/benchmarks/supported/vitabench.md b/docs/benchmarks/supported/vitabench.md index 4ba9402a4..e44e174af 100644 --- a/docs/benchmarks/supported/vitabench.md +++ b/docs/benchmarks/supported/vitabench.md @@ -55,7 +55,7 @@ Food delivery, in-store and travel requests from a simulated user, with up to 66 ## Upstream limitations -- The paper's judge, Claude 3.7 Sonnet, is retired, so Like the paper cannot run: every run names its judge model. Scores compare only between runs with the same judge, never with the paper's. +- The paper's judge, Claude 3.7 Sonnet, is retired, so Like the paper cannot run: every agent's run names its judge model. Scores compare only between runs with the same judge, never with the paper's. - In 15 of the 100 Cross-scenario (English) tasks, the shops, orders or bookings the task relies on are missing, though the Chinese version has them: an agent may fail them through no fault of its own. Score with the Chinese datasets. - Its model calls carry configuration fields (base_url, headers, name, max_input_tokens) that OpenAI's API refuses with HTTP 400: run every model of a VitaBench run on OpenRouter (OpenAI's models are there as openai/...) or a custom endpoint. - A failed model call makes the upstream start the conversation again, up to 3 times, and each costs its calls. diff --git a/docs/standard.md b/docs/standard.md index 5d20a9606..3a169c33b 100644 --- a/docs/standard.md +++ b/docs/standard.md @@ -441,7 +441,7 @@ An `answer` or `score` error that begins `EnvironmentSetupError: `, `VerifierErr | Field in `standard.json` | Meaning | | --- | --- | | `gated` | `true` for a benchmark whose tasks are gated: a unit's failing model endpoint (the agent's, the judge's, the simulated user's) is kept as its status and class, never the provider's words | -| `score.judge` | `{model, says, retired?, served_as?}`: the official judge. Its route (`-judge`) is asked as that model, recorded beside the unit's calls, never as the agent's. `cli run --judge-model` asks another. `retired: true`: no default, a run without `--judge-model` is refused. `served_as`: `{provider: name}` where a provider lists the model under another name | +| `score.judge` | `{model, says, retired?, served_as?}`: the official judge. Its route (`-judge`) is asked as that model, recorded beside the unit's calls, never as the agent's. `cli run --judge-model` asks another. `retired: true`: no default; an agent's run without `--judge-model` is refused, a control's gets no judge. `served_as`: `{provider: name}` where a provider lists the model under another name | | `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** | | `limits.turns` | At most this many agent turns in a conversation (default 20; `cli run --max-turns` forces another) | From 6bfb2f1c5cb8c69dcf2f4362cb8edf27a2c0bae1 Mon Sep 17 00:00:00 2001 From: Etienne Filhol Date: Fri, 27 Nov 2026 10:47:57 +0100 Subject: [PATCH 08/15] docs(catalogue): VitaBench's cross-scenario first request needs more than a 32k context --- app/nullius/catalogue/benchmarks/vitabench/benchmark.json | 1 + docs/benchmarks/supported/vitabench.md | 1 + 2 files changed, 2 insertions(+) diff --git a/app/nullius/catalogue/benchmarks/vitabench/benchmark.json b/app/nullius/catalogue/benchmarks/vitabench/benchmark.json index c4ce99aef..f371428e5 100644 --- a/app/nullius/catalogue/benchmarks/vitabench/benchmark.json +++ b/app/nullius/catalogue/benchmarks/vitabench/benchmark.json @@ -11,6 +11,7 @@ "good_to_know": [ "Scores depend on the judge's and the simulated user's models: keep both fixed when comparing.", "The leaderboard's main result is Cross-scenario (Chinese), with 4 attempts per task.", + "Cross-scenario (Chinese)'s first request is about 37,000 tokens, its 66 tools' descriptions included: a model served with a 32k context fails every task (Qwen2.5-72B on OpenRouter).", "A task passes only when every rubric is met." ], "upstream_limitations": [ diff --git a/docs/benchmarks/supported/vitabench.md b/docs/benchmarks/supported/vitabench.md index e44e174af..e9dd7dc64 100644 --- a/docs/benchmarks/supported/vitabench.md +++ b/docs/benchmarks/supported/vitabench.md @@ -51,6 +51,7 @@ Food delivery, in-store and travel requests from a simulated user, with up to 66 - Scores depend on the judge's and the simulated user's models: keep both fixed when comparing. - The leaderboard's main result is Cross-scenario (Chinese), with 4 attempts per task. +- Cross-scenario (Chinese)'s first request is about 37,000 tokens, its 66 tools' descriptions included: a model served with a 32k context fails every task (Qwen2.5-72B on OpenRouter). - A task passes only when every rubric is met. ## Upstream limitations From 01a1c2e5e81cd9c48ebc054d621ad3bda2565b1a Mon Sep 17 00:00:00 2001 From: Etienne Filhol Date: Fri, 27 Nov 2026 16:04:51 +0100 Subject: [PATCH 09/15] docs(catalogue): VitaBench's failed judge call: retries play the task again --- app/nullius/catalogue/benchmarks/vitabench/benchmark.json | 2 +- docs/benchmarks/supported/vitabench.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/nullius/catalogue/benchmarks/vitabench/benchmark.json b/app/nullius/catalogue/benchmarks/vitabench/benchmark.json index f371428e5..212436949 100644 --- a/app/nullius/catalogue/benchmarks/vitabench/benchmark.json +++ b/app/nullius/catalogue/benchmarks/vitabench/benchmark.json @@ -25,7 +25,7 @@ ], "limitations": [ "Another agent gets the upstream's prompt plus two lines from Nullius: where its tools are, and that its last message in a turn goes to the user.", - "With another agent, a judge call that fails gives the task an error, not a score. With its own agent, VitaBench plays the whole task again instead." + "With another agent, a judge call that fails gives the task an error, not a score: set Retries after an error to 3 to play the whole task again, as VitaBench does with its own agent." ], "datasets": [ { diff --git a/docs/benchmarks/supported/vitabench.md b/docs/benchmarks/supported/vitabench.md index e9dd7dc64..d7b95ab23 100644 --- a/docs/benchmarks/supported/vitabench.md +++ b/docs/benchmarks/supported/vitabench.md @@ -67,7 +67,7 @@ Food delivery, in-store and travel requests from a simulated user, with up to 66 ## Nullius limitations - Another agent gets the upstream's prompt plus two lines from Nullius: where its tools are, and that its last message in a turn goes to the user. -- With another agent, a judge call that fails gives the task an error, not a score. With its own agent, VitaBench plays the whole task again instead. +- With another agent, a judge call that fails gives the task an error, not a score: set Retries after an error to 3 to play the whole task again, as VitaBench does with its own agent. ## Cite From 712bbdc8b23e9a8e00dab13d3c06d80ce9f9af5d Mon Sep 17 00:00:00 2001 From: Etienne Filhol Date: Fri, 27 Nov 2026 16:15:25 +0100 Subject: [PATCH 10/15] feat(standard): a benchmark's own retries are a run's default; VitaBench retries 3 times --- .../catalogue/benchmarks/vitabench/benchmark.json | 2 +- app/nullius/catalogue/benchmarks/vitabench/standard.json | 1 + app/nullius/standard/cli.py | 6 +++--- app/nullius/standard/contract/definitions.py | 4 ++++ app/nullius/standard/pages/recipe.py | 9 ++++++--- app/nullius/standard/runner/retries.py | 2 +- app/nullius/standard/runner/run.py | 5 +++-- app/static/builder/command-builder.js | 2 +- app/tests/test_standard_controls.py | 9 +++++++++ app/tests/test_standard_setups.py | 8 ++++++++ docs/benchmarks/supported/vitabench.md | 2 +- docs/cli/run.md | 2 +- docs/standard.md | 1 + 13 files changed, 40 insertions(+), 13 deletions(-) diff --git a/app/nullius/catalogue/benchmarks/vitabench/benchmark.json b/app/nullius/catalogue/benchmarks/vitabench/benchmark.json index 212436949..aa7b4a814 100644 --- a/app/nullius/catalogue/benchmarks/vitabench/benchmark.json +++ b/app/nullius/catalogue/benchmarks/vitabench/benchmark.json @@ -25,7 +25,7 @@ ], "limitations": [ "Another agent gets the upstream's prompt plus two lines from Nullius: where its tools are, and that its last message in a turn goes to the user.", - "With another agent, a judge call that fails gives the task an error, not a score: set Retries after an error to 3 to play the whole task again, as VitaBench does with its own agent." + "A task that ends in an error, a failed judge call included, is played again up to 3 times, as VitaBench's own runner does." ], "datasets": [ { diff --git a/app/nullius/catalogue/benchmarks/vitabench/standard.json b/app/nullius/catalogue/benchmarks/vitabench/standard.json index 21aa69232..78b7079b9 100644 --- a/app/nullius/catalogue/benchmarks/vitabench/standard.json +++ b/app/nullius/catalogue/benchmarks/vitabench/standard.json @@ -121,6 +121,7 @@ "limits": { "turn_seconds": 7200, "turns": 160, + "retries": 3, "score_seconds": 3600, "attempts": "Attempt N is the upstream's trial N-1: its recorded seed is the one run_tasks draws for it from 300. The upstream sends no seed to a model." }, diff --git a/app/nullius/standard/cli.py b/app/nullius/standard/cli.py index 17feffa13..dbb5eff91 100644 --- a/app/nullius/standard/cli.py +++ b/app/nullius/standard/cli.py @@ -658,7 +658,7 @@ def _boat_units(a, b, other) -> int: print("refused:", "; ".join(bad)) return 2 words = [b["key"] if "_version" not in b else definitions.ref_of(b), a.other, "--provider", a.provider, - "--dataset", ds, "--attempts", str(a.repeat), "--retries", str(a.retries)] + "--dataset", ds, "--attempts", str(a.repeat), *(["--retries", str(a.retries)] if a.retries is not None else [])] for field in ("model", "judge_model", "simulator_model", "max_usd_per_unit", "max_turns", "max_calls"): value = getattr(a, field) if value is not None: @@ -855,9 +855,9 @@ def main(argv=None): p.add_argument("--attempts", "--repeat", dest="repeat", type=int, default=1, metavar="K", help="run each unit K times, each an attempt counted whatever its result " "(the upstream's --num-trials, pass^k); default 1") - p.add_argument("--retries", type=_retries, default=RETRIES, metavar="N", + p.add_argument("--retries", type=_retries, metavar="N", help="run a failed attempt again, up to N times, after the other units: never after a timeout, " - f"a wrong key or model, spent credit or a cap; 0 to {MAX_RETRIES}, default {RETRIES}") + f"a wrong key or model, spent credit or a cap; 0 to {MAX_RETRIES}, default the benchmark's limits.retries, else {RETRIES}") p.add_argument("--remove-images", action="store_true", help="remove each image this run pulls or builds when its last unit ends (default: kept for the next run)") p.add_argument("--name") diff --git a/app/nullius/standard/contract/definitions.py b/app/nullius/standard/contract/definitions.py index 0f5cf4133..a94ca0d23 100644 --- a/app/nullius/standard/contract/definitions.py +++ b/app/nullius/standard/contract/definitions.py @@ -170,6 +170,7 @@ def setup_label(bench, which): # What a version may say for itself; the rest of the file is shared. VERSIONED = ("upstream", "install", "start", "model", "env", "options", "caches", "fidelity", "proven") # What a benchmark's version may say for itself: its data, its driver, how it scores, who plays its user, its environments. +MAX_RETRIES = 9 # the most retries of a failed attempt (runner.retries, cli run --retries) BENCH_VERSIONED = ("upstream", "datasets", "files", "driver", "mcp_servers", "score", "simulator", "limits", "controls", "environments", "options", "host", "setups", "proven", "leaderboard") # What a benchmark option may need: embedding and reranker models through the relay, @@ -1635,6 +1636,9 @@ def problems(d: dict, kind: str) -> List[str]: v = lim.get(f) if v is not None and (isinstance(v, bool) or not isinstance(v, int) or not 1 <= v <= 100000): bad.append(f"limits.{f}: a whole number from 1") + r = lim.get("retries") + if r is not None and (isinstance(r, bool) or not isinstance(r, int) or not 0 <= r <= MAX_RETRIES): + bad.append(f"limits.retries: the upstream's own retries of a failed unit, a whole number from 0 to {MAX_RETRIES}") cuts = lim.get("scored_cuts") if cuts is not None and (not isinstance(cuts, list) or not cuts or len(set(map(str, cuts))) != len(cuts) or any(c not in CUTS for c in cuts)): diff --git a/app/nullius/standard/pages/recipe.py b/app/nullius/standard/pages/recipe.py index 9b26f6736..899fa5be8 100644 --- a/app/nullius/standard/pages/recipe.py +++ b/app/nullius/standard/pages/recipe.py @@ -188,6 +188,7 @@ def _bench_page(b: dict) -> dict: # what the upstream's leaderboard fixes besides the ranked model (Like the leaderboard) "leaderboard": b.get("leaderboard") or None, "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 "timeouts": {"setup": run.DRIVER_SECONDS, "setup_agent": (b.get("limits") or {}).get("setup_seconds") or run.DRIVER_SECONDS, "image": run.IMAGE_SECONDS, "score": (b.get("limits") or {}).get("score_seconds") or run.DRIVER_SECONDS, "agent": (b.get("limits") or {}).get("turn_seconds") or run.TURN_SECONDS, @@ -618,10 +619,12 @@ def add(step, message, shown=False, field=None, unset=False): if lb and repeat < lb.get("repeat", 1): add("limits", f"Like the leaderboard runs each {(b.get('units') or {}).get('noun', 'unit')} at least {lb['repeat']} times.") # each attempt run again up to N times when it ends in a failure a further try may mend (runner.retries) - retries = 0 if recipe.get("retries") in (None, "") else _int(recipe.get("retries"), 0, MAX_RETRIES) + # empty: the upstream's own retries (limits.retries), as the run takes them without --retries + own_retries = (b.get("limits") or {}).get("retries", 0) + retries = own_retries if recipe.get("retries") in (None, "") else _int(recipe.get("retries"), 0, MAX_RETRIES) if retries is None: add("limits", f"Retries after an error: a whole number from 0 to {MAX_RETRIES}.") - retries = 0 + retries = own_retries sim_model = str(recipe.get("simulator_model") or "").strip() judge_model = str(recipe.get("judge_model") or "").strip() like = {"paper": "Like the paper", "leaderboard": "Like the leaderboard"}.get(model_choice) @@ -843,7 +846,7 @@ def command_for(d: dict, p: dict, index: int) -> str: "--dataset", d["id"], *(["--limit", str(limit)] if isinstance(limit, int) else []), "-j", str(conc), *[w for k, v in options_for_pick(d, p).items() for w in ("--bench-option", f"{k}={v}")], *(["--attempts", str(repeat)] if repeat > 1 else []), - *(["--retries", str(retries)] if retries else []), + *(["--retries", str(retries)] if retries != own_retries else []), *(["--max-usd", f"{share:.6f}".rstrip("0").rstrip(".")] if share and spends(p) else []), *(["--max-usd-per-unit", f"{per_unit:.6f}".rstrip("0").rstrip(".")] if per_unit and spends(p) else []), *[w for k, v in forced.items() for w in ("--timeout", f"{k}={v:g}")], diff --git a/app/nullius/standard/runner/retries.py b/app/nullius/standard/runner/retries.py index 3ecac5535..a193301c2 100644 --- a/app/nullius/standard/runner/retries.py +++ b/app/nullius/standard/runner/retries.py @@ -22,10 +22,10 @@ from typing import Optional from nullius.standard.calls import ledger, relay +from nullius.standard.contract.definitions import MAX_RETRIES from nullius.standard.runner import pace RETRIES = 0 -MAX_RETRIES = 9 NOT_RETRIED = frozenset({ # Harbor's RetryConfig.exclude_exceptions: a result, or a mistake a second try does not mend diff --git a/app/nullius/standard/runner/run.py b/app/nullius/standard/runner/run.py index e9008e458..51f0e3bda 100644 --- a/app/nullius/standard/runner/run.py +++ b/app/nullius/standard/runner/run.py @@ -723,7 +723,7 @@ def __init__(self, bench: dict, other: dict, *, model: str, provider: str, datas turn_seconds: Optional[int] = None, say: Callable[[str], None] = print, env=os.environ, proving: bool = False, unsandboxed: bool = False, judge_model: Optional[str] = None, backend: str = "local", options: Optional[dict] = None, shard: Optional[tuple] = None, shard_by: str = "id", - launch: Optional[str] = None, repeat: int = 1, retries: int = RETRIES, + launch: Optional[str] = None, repeat: int = 1, retries: Optional[int] = None, retry_if: Optional[Callable[[dict], bool]] = None, simulator_model: Optional[str] = None, licences: Optional[Licences] = None, bench_options: Optional[dict] = None, which=shutil.which, remove_images: bool = False, prices: Optional[dict] = None, max_usd: Optional[float] = None, @@ -989,7 +989,8 @@ def __init__(self, bench: dict, other: dict, *, model: str, provider: str, datas self.limit, self.concurrency = limit, limits.concurrency(max(1, int(concurrency)), self.constraints) self.units_file = units_file self.repeat = max(1, int(repeat or 1)) - self.retries = max(0, int(retries or 0)) + # not given: the upstream's own retries (limits.retries), else none + self.retries = max(0, int((bench.get("limits") or {}).get("retries", RETRIES) if retries is None else retries)) self.retry_if = retry_if or retryable # an attempt a try may follow keeps what that try needs: its own image (removed when no try follows, # ``release_image``), its unit's count of what it spent (``ledger.forget``), and a rate limit's end diff --git a/app/static/builder/command-builder.js b/app/static/builder/command-builder.js index 606bf1d9f..5fa712ac7 100644 --- a/app/static/builder/command-builder.js +++ b/app/static/builder/command-builder.js @@ -797,7 +797,7 @@ + field('Concurrent ' + u.nouns, 'concurrency', rec.concurrency, {type: 'number', min: 1, max: 32, placeholder: rec.backend === 'boat' ? String((schema.standardHere || {}).boatSlots || 'Boat\'s limit') : '1'}) + '' + '
' + field('Attempts per ' + u.noun, 'repeat', rec.repeat || '', {type: 'number', min: 1, max: 32, placeholder: '1', hint: 'Each ' + esc(u.noun) + ' is run and scored this many times.'}) - + field('Retries after an error', 'retries', rec.retries ?? '', {type: 'number', min: 0, max: 9, placeholder: '0', + + field('Retries after an error', 'retries', rec.retries ?? '', {type: 'number', min: 0, max: 9, placeholder: String(b.retries || 0), hint: 'Retry errors such as rate limits or crashes, but not failed ' + esc(u.nouns) + '.'}) + '
' // a conversation's most agent turns (recipe.py: run --max-turns): only a benchmark that holds conversations has turns + ((b.needs || []).includes('agent.conversation/v1') diff --git a/app/tests/test_standard_controls.py b/app/tests/test_standard_controls.py index 2ea7128e6..ca471262b 100644 --- a/app/tests/test_standard_controls.py +++ b/app/tests/test_standard_controls.py @@ -180,6 +180,15 @@ def test_a_retired_judge_is_never_the_default(self): self.assertEqual(run.Run(b, definitions.control(b, "nop"), model="", provider="openai", env=env, judge_model="judge-2").judge_model, "judge-2") + def test_a_runs_retries_default_to_the_benchmarks_own(self): + b = kit("agent-task-v1", os.path.join(self.tmp, "kits")) + nop = definitions.control(b, "nop") + self.assertEqual(run.Run(b, nop, model="", provider="openai", env={}).retries, 0) + b["limits"] = dict(b.get("limits") or {}, retries=3) + self.assertEqual([run.Run(b, nop, model="", provider="openai", env={}, retries=r).retries for r in (None, 0, 1)], [3, 0, 1]) + self.assertIn("limits.retries: the upstream's own retries of a failed unit, a whole number from 0 to 9", + definitions.problems(dict(b, limits={"retries": 10}), "benchmark")) + def test_a_standard_job_named_oracle_without_the_record_is_no_control(self): j = parse.parse_job(self.go("agent-task-v1", "oracle")) with open(os.path.join(j.dir, "config.json")) as f: diff --git a/app/tests/test_standard_setups.py b/app/tests/test_standard_setups.py index 19fd59b97..7dfa05763 100644 --- a/app/tests/test_standard_setups.py +++ b/app/tests/test_standard_setups.py @@ -362,6 +362,14 @@ def test_a_retired_judge_refuses_like_the_paper_and_leaves_any_model(self): o, _ = definitions.setup(definitions.get("benchmark", "vitabench"), "original", "vendor/m", "openrouter") self.assertEqual((o["sent"], o["comparable"]), ("vendor/m", False)) + def test_a_benchmarks_own_retries_are_the_default_and_the_command_names_another(self): + vita = dict(benchmark="vitabench", datasets=["cross"], others=["original"], provider="openrouter", model="vendor/m", + judge_model="vendor/judge") + out = self.compiled(**vita) + self.assertNotIn("--retries", out["script"]) # the run takes limits.retries itself + self.assertIn("up to 3 retries an attempt", json.dumps(out)) + self.assertIn("--retries 0", self.compiled(**vita, retries=0)["script"]) + def test_like_the_leaderboard_runs_its_user_simulator_options_and_attempts(self): tau = dict(benchmark="tau3-bench", datasets=["airline"], others=["original"], provider="openai", model="their-model", model_choice="leaderboard") diff --git a/docs/benchmarks/supported/vitabench.md b/docs/benchmarks/supported/vitabench.md index d7b95ab23..f6f4411ac 100644 --- a/docs/benchmarks/supported/vitabench.md +++ b/docs/benchmarks/supported/vitabench.md @@ -67,7 +67,7 @@ Food delivery, in-store and travel requests from a simulated user, with up to 66 ## Nullius limitations - Another agent gets the upstream's prompt plus two lines from Nullius: where its tools are, and that its last message in a turn goes to the user. -- With another agent, a judge call that fails gives the task an error, not a score: set Retries after an error to 3 to play the whole task again, as VitaBench does with its own agent. +- A task that ends in an error, a failed judge call included, is played again up to 3 times, as VitaBench's own runner does. ## Cite diff --git a/docs/cli/run.md b/docs/cli/run.md index ffc40c4b7..5bed01e41 100644 --- a/docs/cli/run.md +++ b/docs/cli/run.md @@ -127,7 +127,7 @@ A benchmark that names a cut in `limits.scored_cuts` still scores an agent's uni ## Retries -`--retries N` (at most 9) runs a failed attempt again after the other units; the last try counts. +`--retries N` (at most 9) runs a failed attempt again after the other units; the last try counts. Default: the benchmark's `limits.retries`, else 0. | Failure | Retried | | --- | --- | diff --git a/docs/standard.md b/docs/standard.md index 3a169c33b..dde714d10 100644 --- a/docs/standard.md +++ b/docs/standard.md @@ -453,6 +453,7 @@ An `answer` or `score` error that begins `EnvironmentSetupError: `, `VerifierErr | `driver.unit_end` | `true`: the driver is sent `end` (`unit`, `dir`) once each unit an agent ran has ended, scored or not, so that what its setup started for the agent ends with the unit. A control's or a setup's unit gets none | | `driver.task_given` | `true`: the driver is sent `task_given` before each agent is given its task, and the task waits for its answer: [the computer port](ports/agent-computer-v1.md#the-window-before-the-task) closes its window before the task there. A control's or a setup's unit gets none | | `limits.attempts` | How the upstream tells attempts apart; the driver is then sent `attempt` with `setup`, `turn` and `answer` | +| `limits.retries` | The upstream's own retries of a failed unit (0 to 9): a run's `--retries` when none is given | | `limits.scored_cuts` | The cuts after which an agent's unit is still scored: `time`, `calls`, `end` ([a unit cut at a limit](cli/run.md#a-unit-cut-at-a-limit)) | | `units.redistribute` | `false` when the data may not be redistributed: `cli prove` then records no unit id | From ae549bbc3c005d95c4e6d59a328e7b6f155dcf73 Mon Sep 17 00:00:00 2001 From: Etienne Filhol Date: Fri, 27 Nov 2026 17:17:19 +0100 Subject: [PATCH 11/15] feat(catalogue): list VitaBench's tasks by their instructions' first sentence --- .../catalogue/benchmarks/vitabench/driver.py | 15 ++++++++++++++- .../catalogue/benchmarks/vitabench/standard.json | 1 + app/nullius/standard/contract/definitions.py | 2 +- app/tests/test_standard_vitabench.py | 10 ++++++++++ 4 files changed, 26 insertions(+), 2 deletions(-) diff --git a/app/nullius/catalogue/benchmarks/vitabench/driver.py b/app/nullius/catalogue/benchmarks/vitabench/driver.py index 9075cf03d..b7a01dfaf 100644 --- a/app/nullius/catalogue/benchmarks/vitabench/driver.py +++ b/app/nullius/catalogue/benchmarks/vitabench/driver.py @@ -4,6 +4,7 @@ ``standard.json`` pins, installed as this driver's environment and imported: units - the dataset file's tasks, through the upstream's ``Task`` model +describe - each task's instructions to the simulated user, their first sentence as its title setup - the upstream agent's own prompt (``LLMAgent.system_prompt``) and its environment's tools, served by ``mcp_server.py``, which passes each call here turn - the upstream's ``run_task`` in a thread: its Orchestrator, user simulator, @@ -29,6 +30,7 @@ import os import queue import random +import re import shutil import socket import sys @@ -362,6 +364,17 @@ def units(dataset, setup=None): return {"units": list(tasks())} +SENTENCE_END = re.compile(r"(?<=[。!?])|(?<=[.?!])\s+(?=[A-Z0-9])") + + +def describe(dataset=None, **_): + out = {} + for unit, t in tasks().items(): + text = str(t.instructions or "").strip() + out[unit] = {"title": SENTENCE_END.split(" ".join(text.split()), maxsplit=1)[0], "text": text} + return {"units": out} + + def setup(unit, dir, attempt=None): t = task(unit) _leave() @@ -461,4 +474,4 @@ def _scored(st, t, c, dir): if __name__ == "__main__": atexit.register(_leave) # the last unit's socket folder, scored or not - serve({"units": units, "setup": setup, "turn": turn, "answer": answer, "score": score}, out=PROTOCOL) + serve({"units": units, "describe": describe, "setup": setup, "turn": turn, "answer": answer, "score": score}, out=PROTOCOL) diff --git a/app/nullius/catalogue/benchmarks/vitabench/standard.json b/app/nullius/catalogue/benchmarks/vitabench/standard.json index 78b7079b9..e3b63ff6b 100644 --- a/app/nullius/catalogue/benchmarks/vitabench/standard.json +++ b/app/nullius/catalogue/benchmarks/vitabench/standard.json @@ -15,6 +15,7 @@ "license": "MIT" }, "driver": { + "describe": true, "command": [ "{install}/.venv/bin/python", "{here}/driver.py" diff --git a/app/nullius/standard/contract/definitions.py b/app/nullius/standard/contract/definitions.py index b791f18c8..3c7a85aa5 100644 --- a/app/nullius/standard/contract/definitions.py +++ b/app/nullius/standard/contract/definitions.py @@ -169,8 +169,8 @@ def setup_label(bench, which): _VERSION = re.compile(r"^[0-9A-Za-z][0-9A-Za-z.+_-]{0,39}$") # What a version may say for itself; the rest of the file is shared. VERSIONED = ("upstream", "install", "start", "model", "env", "options", "caches", "fidelity", "proven") -# What a benchmark's version may say for itself: its data, its driver, how it scores, who plays its user, its environments. 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") # What a benchmark option may need: embedding and reranker models through the relay, diff --git a/app/tests/test_standard_vitabench.py b/app/tests/test_standard_vitabench.py index 04ec5ca6e..2ae418d84 100644 --- a/app/tests/test_standard_vitabench.py +++ b/app/tests/test_standard_vitabench.py @@ -133,6 +133,16 @@ def score(): return d.request("score", unit=unit, dir=ws, transcript=[], answer="", judge=self.route) return s, ask, call, turn, score + def test_each_task_is_described_by_its_instructions_first_sentence_first(self): + for dataset, unit, title in (("cross", "A0812003", "这周六你和五位好友准备去北京体验一下真人 CS ,"), + ("delivery-en", "10711001", "It's pouring rain outside, and your stomach isn't feeling well today.")): + d = jsonl.Proc(self.argv, BENCH["_here"], self.env(dataset), os.path.join(self.tmp, "driver.log")).start() + self.addCleanup(d.close) + got = d.request("describe", dataset=dataset)["units"] + self.assertEqual(len(got), 100) + self.assertTrue(got[unit]["title"].startswith(title), got[unit]) + self.assertTrue(got[unit]["text"].startswith(got[unit]["title"].rstrip()[:10])) + def test_the_orchestrator_executes_each_call_and_the_users_stop_ends_it(self): s, ask, call, turn, score = self.opened("cross-en", "A0812003", ["Lunch, please.", "Thanks. ###STOP###"]) self.assertIn("Current time: ", s["prompt"]) From fb086c3a20e955b6abc0e375f9e5e2c6105d6f62 Mon Sep 17 00:00:00 2001 From: Etienne Filhol Date: Fri, 27 Nov 2026 17:26:02 +0100 Subject: [PATCH 12/15] docs(catalogue): VitaBench's retries are no limitation --- app/nullius/catalogue/benchmarks/vitabench/benchmark.json | 3 +-- docs/benchmarks/supported/vitabench.md | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/app/nullius/catalogue/benchmarks/vitabench/benchmark.json b/app/nullius/catalogue/benchmarks/vitabench/benchmark.json index aa7b4a814..baff55ceb 100644 --- a/app/nullius/catalogue/benchmarks/vitabench/benchmark.json +++ b/app/nullius/catalogue/benchmarks/vitabench/benchmark.json @@ -24,8 +24,7 @@ "It publishes no reference conversations, so there is no reference control." ], "limitations": [ - "Another agent gets the upstream's prompt plus two lines from Nullius: where its tools are, and that its last message in a turn goes to the user.", - "A task that ends in an error, a failed judge call included, is played again up to 3 times, as VitaBench's own runner does." + "Another agent gets the upstream's prompt plus two lines from Nullius: where its tools are, and that its last message in a turn goes to the user." ], "datasets": [ { diff --git a/docs/benchmarks/supported/vitabench.md b/docs/benchmarks/supported/vitabench.md index f6f4411ac..5cee6612e 100644 --- a/docs/benchmarks/supported/vitabench.md +++ b/docs/benchmarks/supported/vitabench.md @@ -67,7 +67,6 @@ Food delivery, in-store and travel requests from a simulated user, with up to 66 ## Nullius limitations - Another agent gets the upstream's prompt plus two lines from Nullius: where its tools are, and that its last message in a turn goes to the user. -- A task that ends in an error, a failed judge call included, is played again up to 3 times, as VitaBench's own runner does. ## Cite From 0d945a85935ddfdcf8f11771006cc4fe53913345 Mon Sep 17 00:00:00 2001 From: Etienne Filhol Date: Fri, 27 Nov 2026 17:48:12 +0100 Subject: [PATCH 13/15] fix(standard): a proof records the judge its job ran with; VitaBench's proofs again --- .../benchmarks/vitabench/proofs.json | 24 +++++++------------ app/nullius/standard/proofs/prove.py | 3 ++- app/tests/test_standard_controls.py | 7 ++++++ 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/app/nullius/catalogue/benchmarks/vitabench/proofs.json b/app/nullius/catalogue/benchmarks/vitabench/proofs.json index d7640c339..b0383fd38 100644 --- a/app/nullius/catalogue/benchmarks/vitabench/proofs.json +++ b/app/nullius/catalogue/benchmarks/vitabench/proofs.json @@ -22,8 +22,7 @@ "user": "user_simulator", "max_steps": "300", "max_errors": "10" - }, - "judge": "meta/muse-spark-1.3-contributor" + } } }, "delivery": { @@ -43,8 +42,7 @@ "user": "user_simulator", "max_steps": "300", "max_errors": "10" - }, - "judge": "meta/muse-spark-1.3-contributor" + } } }, "instore": { @@ -64,8 +62,7 @@ "user": "user_simulator", "max_steps": "300", "max_errors": "10" - }, - "judge": "meta/muse-spark-1.3-contributor" + } } }, "ota": { @@ -85,8 +82,7 @@ "user": "user_simulator", "max_steps": "300", "max_errors": "10" - }, - "judge": "meta/muse-spark-1.3-contributor" + } } }, "cross-en": { @@ -106,8 +102,7 @@ "user": "user_simulator", "max_steps": "300", "max_errors": "10" - }, - "judge": "meta/muse-spark-1.3-contributor" + } } }, "delivery-en": { @@ -127,8 +122,7 @@ "user": "user_simulator", "max_steps": "300", "max_errors": "10" - }, - "judge": "meta/muse-spark-1.3-contributor" + } } }, "instore-en": { @@ -148,8 +142,7 @@ "user": "user_simulator", "max_steps": "300", "max_errors": "10" - }, - "judge": "meta/muse-spark-1.3-contributor" + } } }, "ota-en": { @@ -169,8 +162,7 @@ "user": "user_simulator", "max_steps": "300", "max_errors": "10" - }, - "judge": "meta/muse-spark-1.3-contributor" + } } } } diff --git a/app/nullius/standard/proofs/prove.py b/app/nullius/standard/proofs/prove.py index bda9735b8..a6384c635 100644 --- a/app/nullius/standard/proofs/prove.py +++ b/app/nullius/standard/proofs/prove.py @@ -264,7 +264,8 @@ def control_check(bench: dict, ds: dict, which: str, *, limit: Optional[int], jo ran_with = _options_of(cfg) if cfg else (options or {}) if ran_with: rec["options"] = ran_with - judge = (cfg.get("standard") or {}).get("judge") if cfg else judge_model or (bench["score"].get("judge") or {}).get("model") + # the judge the job ran with, as its config records it: none for a control that asks no judge + judge = ((cfg or _config(job_dir) or {}).get("standard") or {}).get("judge") if judge: rec["judge"] = judge return rec diff --git a/app/tests/test_standard_controls.py b/app/tests/test_standard_controls.py index ca471262b..18ef759ce 100644 --- a/app/tests/test_standard_controls.py +++ b/app/tests/test_standard_controls.py @@ -355,6 +355,13 @@ def test_the_result_has_every_check_and_its_jobs_and_proven_is_written_without_t self.assertNotIn("limit", proven["oracle"]) self.assertEqual(definitions.problems(written, "benchmark"), []) + def test_a_proof_names_the_judge_its_job_ran_with_and_none_without_one(self): + b = kit("agent-task-v1", os.path.join(self.tmp, "kits")) + b["score"] = dict(b["score"], judge={"model": "judge-1", "says": "x", "retired": True}) + got = self.prove(b, write=False)["kit"] + self.assertTrue(got["nop"]["ok"], got) + self.assertNotIn("judge", got["nop"]) # never the retired one it did not ask + def test_a_shard_s_proof_runs_its_controls_on_its_units_and_says_which(self): from nullius.standard.runner import shard b = kit("agent-workspace-v1", os.path.join(self.tmp, "kits")) From 444382cd02658a36bd1222dd997749da75cfe130 Mon Sep 17 00:00:00 2001 From: Etienne Filhol Date: Mon, 30 Nov 2026 10:01:03 +0100 Subject: [PATCH 14/15] chore(catalogue): leave the controls sentence to its own pull request --- app/nullius/standard/contract/definitions.py | 2 +- app/templates/catalogue/benchmark.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/nullius/standard/contract/definitions.py b/app/nullius/standard/contract/definitions.py index 3dcfb2b40..a16e63278 100644 --- a/app/nullius/standard/contract/definitions.py +++ b/app/nullius/standard/contract/definitions.py @@ -1977,7 +1977,6 @@ def skills_shown(port: str, record: Optional[dict]) -> List[str]: return list(port_skills(port)) if on_current_kit(port, record) else [] - def _served_as(w: str, spec) -> List[str]: """An official judge's or simulated user's ``served_as``: {provider: the name that provider serves it as}.""" sa = spec.get("served_as") if isinstance(spec, dict) else None @@ -1989,6 +1988,7 @@ def _served_as(w: str, spec) -> List[str]: return [f"{w}.served_as: {{provider: the name it serves the model as}}"] return [] + def _skills(d: dict) -> List[str]: """A kit's ``basic`` and ``skills``, a benchmark's ``needs_skills``.""" bad = [] diff --git a/app/templates/catalogue/benchmark.html b/app/templates/catalogue/benchmark.html index 90ba1f7e9..1d73ca34a 100644 --- a/app/templates/catalogue/benchmark.html +++ b/app/templates/catalogue/benchmark.html @@ -73,7 +73,7 @@

Overview

{#- One version's proofs: its pin, each dataset's checks, and the form that runs them on it. -#} {% macro proofs(s) -%} {% if s.upstream.repository %}

{{ s.upstream.repository|replace('https://github.com/', '') }} @ {% if s.upstream.tag %}{{ s.upstream.tag }} · {% elif s.upstream.branch %}{{ s.upstream.branch }} · {% endif %}{{ s.upstream.tested[:7] }}

{% endif %} -

Null and reference controls check each task's environment and scorer; stability and leak checks, the tasks themselves.

+

Null and reference controls check the scorer; stability and leak checks validate the tasks.

From 5831fcaa27cdb9553bcdfd92de0883d791211fad Mon Sep 17 00:00:00 2001 From: Etienne Filhol Date: Mon, 30 Nov 2026 10:20:22 +0100 Subject: [PATCH 15/15] fix(catalogue): an example beside a number default fails a test of the bundled entries, not the check, as in its own pull request --- app/nullius/standard/contract/definitions.py | 5 +---- app/tests/test_standard_options.py | 18 ++++++++++-------- app/ui_tests/test_agents.py | 2 +- docs/standard.md | 2 +- 4 files changed, 13 insertions(+), 14 deletions(-) diff --git a/app/nullius/standard/contract/definitions.py b/app/nullius/standard/contract/definitions.py index a16e63278..83c8b0996 100644 --- a/app/nullius/standard/contract/definitions.py +++ b/app/nullius/standard/contract/definitions.py @@ -128,7 +128,6 @@ _ID = re.compile(r"^[A-Za-z0-9][A-Za-z0-9_.-]{0,63}$") _TAG = re.compile(r"^[A-Za-z0-9][A-Za-z0-9._+/-]{0,127}$") _COMMIT = re.compile(r"^[0-9a-f]{40}$") -_NUMBER = re.compile(r"^-?[0-9]+(?:\.[0-9]+)?$") # a default that shows the form of its own input _SHA256 = re.compile(r"^[0-9a-f]{64}$") _HTTPS = re.compile(r"^https://[A-Za-z0-9.-]+(?:/[A-Za-z0-9_.%@+-]+)+$") _RELATIVE = re.compile(r"^[A-Za-z0-9_-][A-Za-z0-9_.-]*(?:/[A-Za-z0-9_-][A-Za-z0-9_.-]*)*$") @@ -542,9 +541,7 @@ def _options(d: dict) -> List[str]: except re.error: bad.append(f"{w}.pattern: a regular expression") continue - if "example" in o and _NUMBER.match(str(o.get("default"))): - bad.append(f"{w}.example: only when its default is a word, not a number") - elif "example" in o and (option_problem(o, o["example"]) or o["example"] == o.get("default")): + if "example" in o and (option_problem(o, o["example"]) or o["example"] == o.get("default")): 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") diff --git a/app/tests/test_standard_options.py b/app/tests/test_standard_options.py index b0dab8e15..18a3b4c1b 100644 --- a/app/tests/test_standard_options.py +++ b/app/tests/test_standard_options.py @@ -6,6 +6,7 @@ import json import os +import re import shutil import tempfile import unittest @@ -43,24 +44,25 @@ def test_values_or_a_pattern_and_plain_words_only(self): self.assertIn("options.effort: values or pattern, one of them", both) quote = definitions.problems(agent(options={"effort": dict(EFFORT, values=["low", 'x"; rm', "medium"])}), "agent") self.assertIn("options.effort.values: distinct plain words", quote) - pattern = {"summary": "s", "pattern": "^[0-9]{1,3}$", "default": "40"} + pattern = {"summary": "s", "pattern": "^[0-9]{1,3}$", "default": "40", "example": "16"} self.assertEqual(definitions.problems(agent(options={"effort": pattern}), "agent"), []) self.assertTrue(definitions.problems(agent(options={"effort": dict(pattern, default="x")}), "agent")) - def test_an_example_only_beside_a_default_that_is_a_word(self): - pattern = {"summary": "s", "pattern": "^(default|[0-9]{1,3})$", "default": "default", "example": "16"} + def test_a_pattern_carries_an_example_it_allows(self): + pattern = {"summary": "s", "pattern": "^[0-9]{1,3}$", "default": "40"} self.assertEqual(definitions.problems(agent(options={"effort": pattern}), "agent"), []) - self.assertIn("options.effort.example: only when its default is a word, not a number", - definitions.problems(agent(options={"effort": dict(pattern, default="40")}), "agent")) - for example in (16, "x", "1234", "default"): + for example in (16, "x", "1234", "40"): o = dict(pattern, example=example) self.assertIn("options.effort.example: a value its pattern allows besides its default, shown in its place", definitions.problems(agent(options={"effort": o}), "agent")) - def test_every_bundled_pattern_without_a_number_default_carries_an_example(self): + def test_a_bundled_pattern_has_an_example_only_beside_a_word_default(self): + """"200 e.g. 100" reads as two defaults: an example only where the default is a word (default, none).""" + number = re.compile(r"^-?[0-9]+(?:\.[0-9]+)?$") for kind in ("benchmark", "agent", "capability"): for d in definitions.load(kind, root=definitions.CATALOGUE, every=True)[0]: for n, o in (d.get("options") or {}).items(): - self.assertTrue("pattern" not in o or "example" in o or definitions._NUMBER.match(str(o.get("default"))), f"{d['_ref']} {n}") + if "pattern" in o: + self.assertEqual("example" in o, not number.match(str(o.get("default"))), f"{d['_ref']} {n}") def test_a_name_and_a_summary(self): bad = definitions.problems(agent(options={"Effort": dict(EFFORT), "effort": dict(EFFORT, summary="")}), "agent") diff --git a/app/ui_tests/test_agents.py b/app/ui_tests/test_agents.py index 3282a86ce..08b4aff64 100644 --- a/app/ui_tests/test_agents.py +++ b/app/ui_tests/test_agents.py @@ -316,7 +316,7 @@ def test_an_option_with_a_pattern_shows_its_example_not_the_pattern(self): root = self.tmp / "catalogue" shutil.copytree(ROOT, root) path = root / "agents" / "fake" / "agent.json" - path.write_text(json.dumps(dict(json.loads(path.read_text()), options={"turns": {"summary": "Turns.", "pattern": "default|[1-9][0-9]{0,2}", "example": "40", "default": "default"}}))) + path.write_text(json.dumps(dict(json.loads(path.read_text()), options={"turns": {"summary": "Turns.", "pattern": "[1-9][0-9]{0,2}", "example": "40", "default": "10"}}))) self.stack.enter_context(patch.object(definitions, "load", lambda kind, root_=None, every=False: _LOAD(kind, str(root), every=every))) self.stack.enter_context(patch.object(definitions, "get", lambda kind, key, root_=None: _GET(kind, key, str(root)))) html = self.get("/agents/fake").get_data(as_text=True) diff --git a/docs/standard.md b/docs/standard.md index 7f67b2628..fb65b9328 100644 --- a/docs/standard.md +++ b/docs/standard.md @@ -493,7 +493,7 @@ The upstream's dependencies go in `driver.install` (a capability's `install` is | Key of an option | Meaning | | --- | --- | -| `summary`, `values` or `pattern`, `example`, `default` | What it changes, its allowed choices or input pattern, and its value when unset. `example`, only beside a default that is a word, is a value the pattern allows besides it | +| `summary`, `values` or `pattern`, `example`, `default` | What it changes, its allowed choices or input pattern, and its value when unset. `example`, optional and checked when given, is a value the pattern allows besides the default; give it only beside a default that is a word | | `datasets` | The datasets it applies to | | `about` | A line about each value | | `names` | A name for some values, shown in their place; a recipe and the CLI keep the value |