diff --git a/app/nullius/catalogue/agents/jiuwenswarm/agent.json b/app/nullius/catalogue/agents/jiuwenswarm/agent.json index c9b7e4606..8919d8139 100644 --- a/app/nullius/catalogue/agents/jiuwenswarm/agent.json +++ b/app/nullius/catalogue/agents/jiuwenswarm/agent.json @@ -95,7 +95,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 37b201899..85d611fd0 100644 --- a/app/nullius/catalogue/benchmarks/osworld1/standard.json +++ b/app/nullius/catalogue/benchmarks/osworld1/standard.json @@ -255,7 +255,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 191acfdf3..bc826d169 100644 --- a/app/nullius/catalogue/benchmarks/tau3-bench/standard.json +++ b/app/nullius/catalogue/benchmarks/tau3-bench/standard.json @@ -99,6 +99,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": { @@ -124,6 +125,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" } }, @@ -335,7 +337,6 @@ ], "default": "200", "pattern": "[1-9][0-9]?|1[0-9]{2}|200", - "example": "100", "limit": true }, "max_errors": { @@ -347,7 +348,6 @@ ], "default": "10", "pattern": "[1-9][0-9]{0,3}", - "example": "5", "limit": true }, "upstream_agent": { diff --git a/app/nullius/catalogue/benchmarks/vitabench/benchmark.json b/app/nullius/catalogue/benchmarks/vitabench/benchmark.json new file mode 100644 index 000000000..baff55ceb --- /dev/null +++ b/app/nullius/catalogue/benchmarks/vitabench/benchmark.json @@ -0,0 +1,75 @@ +{ + "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": [ + "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": [ + "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.", + "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." + ], + "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." + ], + "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..b7a01dfaf --- /dev/null +++ b/app/nullius/catalogue/benchmarks/vitabench/driver.py @@ -0,0 +1,477 @@ +"""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 +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, + 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 +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 atexit +import contextlib +import json +import os +import queue +import random +import re +import shutil +import socket +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 +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." +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 + + +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": + # 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 + 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())} + + +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() + 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"] + 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 + 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)) + 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, "describe": describe, "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..b0383fd38 --- /dev/null +++ b/app/nullius/catalogue/benchmarks/vitabench/proofs.json @@ -0,0 +1,171 @@ +{ + "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" + } + } + }, + "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" + } + } + }, + "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" + } + } + }, + "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" + } + } + }, + "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" + } + } + }, + "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" + } + } + }, + "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" + } + } + }, + "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" + } + } + } + } + } + } +} diff --git a/app/nullius/catalogue/benchmarks/vitabench/standard.json b/app/nullius/catalogue/benchmarks/vitabench/standard.json new file mode 100644 index 000000000..e3b63ff6b --- /dev/null +++ b/app/nullius/catalogue/benchmarks/vitabench/standard.json @@ -0,0 +1,289 @@ +{ + "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": { + "describe": true, + "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 (Chinese)", + "path": "data/vita/domains/cross_domain/tasks.json", + "sha256": "a7e782785f40667511a54562d613e2122de645a36b8661a5658c1740d34a5815", + "units": 100 + }, + { + "id": "delivery", + "label": "Delivery (Chinese)", + "path": "data/vita/domains/delivery/tasks.json", + "sha256": "22746ae23eb6dbed2ee6a5e3a0f476af60e8a43bab0ea2d3ead54f0ef3829f94", + "units": 100 + }, + { + "id": "instore", + "label": "In-store (Chinese)", + "path": "data/vita/domains/instore/tasks.json", + "sha256": "f92b9313e5476499d51b73a929cc901b7d87cd7c3315df56942d62c83aa34407", + "units": 100 + }, + { + "id": "ota", + "label": "OTA (Chinese)", + "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", + "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": { + "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", + "retired": true, + "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, + "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." + }, + "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", + "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}", + "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" + ] + }, + "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 model's own default." + } + }, + "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]+)?" + }, + "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/providers.py b/app/nullius/providers.py index ac7f1e75a..f0dc8c496 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 7e9e2d01b..308443d21 100644 --- a/app/nullius/standard/cli.py +++ b/app/nullius/standard/cli.py @@ -679,7 +679,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: @@ -689,8 +689,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(): @@ -1127,9 +1127,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 0b6e846aa..83c8b0996 100644 --- a/app/nullius/standard/contract/definitions.py +++ b/app/nullius/standard/contract/definitions.py @@ -168,6 +168,7 @@ 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") +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") @@ -1698,6 +1699,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)): @@ -1719,6 +1723,9 @@ 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") + bad += _served_as("score.judge", j) x = s.get("experiment_judge") if x is not None and (j is not None or not isinstance(x, dict) or not x.get("label") or not x.get("says") or not _MODEL_NAME.match(str(x.get("model", "")))): @@ -1729,6 +1736,7 @@ def problems(d: dict, kind: str) -> List[str]: 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")) @@ -1966,6 +1974,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 8cd5dd78e..b05b7c48d 100644 --- a/app/nullius/standard/pages/recipe.py +++ b/app/nullius/standard/pages/recipe.py @@ -200,7 +200,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)} @@ -209,11 +209,13 @@ 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")), # a judge beside the score, run only when the recipe names its model "experiment_judge": {k: v for k, v in ((b.get("score") or {}).get("experiment_judge") or {}).items() if k in ("label", "model")} or None, # what the upstream's leaderboard fixes besides the ranked model (Like the leaderboard) "leaderboard": b.get("leaderboard") or None, "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, @@ -661,7 +663,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): @@ -695,17 +699,23 @@ 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() 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.") # 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 @@ -842,8 +852,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 judge_model if judges 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 judge_model if judges 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]) @@ -859,8 +869,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 judge_model if judges 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 judge_model if judges 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) @@ -955,7 +965,7 @@ def command_for(d: dict, p: dict, index: int) -> str: *(["--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/proofs/prove.py b/app/nullius/standard/proofs/prove.py index 303bf7433..6bbe165c7 100644 --- a/app/nullius/standard/proofs/prove.py +++ b/app/nullius/standard/proofs/prove.py @@ -277,7 +277,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/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 76558ca85..ce79f91ab 100644 --- a/app/nullius/standard/runner/run.py +++ b/app/nullius/standard/runner/run.py @@ -733,7 +733,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, @@ -894,12 +894,17 @@ def __init__(self, bench: dict, other: dict, *, model: str, provider: str, datas # The official one is written as its maker spells it; the run's provider may spell it otherwise. # An experiment judge (``score.experiment_judge``) runs only when the run names its model. j = (bench.get("score") or {}).get("judge") - self.judge_model = ((judge_model or providers.served_as(j["model"], provider)) if j + # 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: + 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 judge_model or None if (bench.get("score") or {}).get("experiment_judge") 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: @@ -1015,7 +1020,8 @@ def __init__(self, bench: dict, other: dict, *, model: str, provider: str, datas self.units_file = units_file self.task_set = task_set 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-core.js b/app/static/builder/command-builder-core.js index 8c7d02fd6..cbea9fcf8 100644 --- a/app/static/builder/command-builder-core.js +++ b/app/static/builder/command-builder-core.js @@ -91,7 +91,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/builder/command-builder.js b/app/static/builder/command-builder.js index 6dd2b46aa..1baa6f893 100644 --- a/app/static/builder/command-builder.js +++ b/app/static/builder/command-builder.js @@ -862,8 +862,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)', after: reasoningLine(rec, 'simulator'), 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)', after: reasoningLine(rec, 'judge'), - 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)', after: reasoningLine(rec, 'judge'), + 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') : '') // a judge beside the benchmark's score, never its own: run only when a model is named + (b.experiment_judge && !paper ? field(esc(b.experiment_judge.label) + ' (experiment)', 'judge_model', rec.judge_model || '', {list: 'nb-models', placeholder: 'None', hint: 'A second score beside ' + esc(b.label) + "'s, never in its place. Empty: none. Its source used " + esc(b.experiment_judge.model) + '.'}) + servedField(rec, 'judge') : '') @@ -882,7 +882,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/static/catalogue/marks.svg b/app/static/catalogue/marks.svg index dce84e25b..e8aff7ed8 100644 --- a/app/static/catalogue/marks.svg +++ b/app/static/catalogue/marks.svg @@ -35,4 +35,6 @@ + + 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_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_controls.py b/app/tests/test_standard_controls.py index 542df30a2..9a8e98124 100644 --- a/app/tests/test_standard_controls.py +++ b/app/tests/test_standard_controls.py @@ -169,6 +169,26 @@ 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, {"_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") + + 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: @@ -335,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")) diff --git a/app/tests/test_standard_options.py b/app/tests/test_standard_options.py index 3ad12f39d..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 @@ -54,11 +55,14 @@ def test_a_pattern_carries_an_example_it_allows(self): 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_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, 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/tests/test_standard_run.py b/app/tests/test_standard_run.py index efe412f88..55fd7675f 100644 --- a/app/tests/test_standard_run.py +++ b/app/tests/test_standard_run.py @@ -1317,6 +1317,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/app/tests/test_standard_setups.py b/app/tests/test_standard_setups.py index 60b840947..ff82fd191 100644 --- a/app/tests/test_standard_setups.py +++ b/app/tests/test_standard_setups.py @@ -362,6 +362,26 @@ 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) + 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"]) + 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/app/tests/test_standard_vitabench.py b/app/tests/test_standard_vitabench.py new file mode 100644 index 000000000..2ae418d84 --- /dev/null +++ b/app/tests/test_standard_vitabench.py @@ -0,0 +1,231 @@ +"""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 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) + + 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"]) + 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_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() + 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 4f4a61cb5..9d08a98d3 100644 --- a/app/ui_tests/test_catalogue_routes.py +++ b/app/ui_tests/test_catalogue_routes.py @@ -128,7 +128,7 @@ def test_every_listed_benchmark_is_a_card_opening_its_page(self): cat = catalog.load() keys = re.findall(r'%s" % o["example"], html) + if "pattern" in o: self.assertNotIn(o["pattern"], unescape(html)) self.assertNotIn("Provider default", self.page("osworld1")) diff --git a/app/ui_tests/test_command_builder_state.py b/app/ui_tests/test_command_builder_state.py index 8006a9853..8604ff6eb 100644 --- a/app/ui_tests/test_command_builder_state.py +++ b/app/ui_tests/test_command_builder_state.py @@ -96,9 +96,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..9d17bb1af 100644 --- a/docs/agents/supported/jiuwenswarm.md +++ b/docs/agents/supported/jiuwenswarm.md @@ -31,16 +31,16 @@ 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 - + - - - + + +
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/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/benchmarks/supported/vitabench.md b/docs/benchmarks/supported/vitabench.md new file mode 100644 index 000000000..5cee6612e --- /dev/null +++ b/docs/benchmarks/supported/vitabench.md @@ -0,0 +1,82 @@ + + +# 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` | 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` | 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` | + +## 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 + +- 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. +- 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 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. + +## 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/cli/run.md b/docs/cli/run.md index af192968e..603eeb6e0 100644 --- a/docs/cli/run.md +++ b/docs/cli/run.md @@ -130,7 +130,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 a5fb05ea9..fb65b9328 100644 --- a/docs/standard.md +++ b/docs/standard.md @@ -443,9 +443,9 @@ 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?, 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 | | `score.experiment_judge` | `{label, model, says}`: a judge beside the score, never in its place, on a benchmark with no official one. Runs only on `--judge-model`, on the same route; `model` is the one its source used, never a default | -| `simulator` | `{model, says}`, 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 | +| `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) | @@ -458,6 +458,7 @@ An `answer` or `score` error that begins `EnvironmentSetupError: `, `VerifierErr | `driver.list_command` | A start of the driver for listings alone, needing only the standard library and the dataset's files; `{here}` its one slot | | `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 | | `units.categories` | `{FIELD: {label, names: {VALUE: name}}}`: how `describe`'s categories read on a listing; `--category` still takes the value | @@ -492,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`, 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`, 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 | @@ -639,7 +640,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) |