diff --git a/verifiers/v1/agent.py b/verifiers/v1/agent.py index ec4f0061af..b993469da3 100644 --- a/verifiers/v1/agent.py +++ b/verifiers/v1/agent.py @@ -221,17 +221,17 @@ async def run( task: Task, *, runtime: Runtime | None = None, - shared_tools: Mapping[str, SharedToolServer] | None = None, + tools: Mapping[str, SharedToolServer] | None = None, ) -> Trace: """Run this agent on `task` once and return the trace: `runtime` places it - into a live borrowed box instead of provisioning one; `shared_tools` are - live servers borrowed from their owner, counted in the pairing check. + into a live borrowed box instead of provisioning one; `tools` are live + servers borrowed from their owner, counted in the pairing check. Retries whole while the trace ends with a retryable error (`config.retries`) — never into a borrowed box; the final trace keeps earlier attempts' errors.""" retry = self.config.retries history: list = [] for attempt in range(retry.max_retries + 1): - trace = await self._run_once(task, runtime, shared_tools) + trace = await self._run_once(task, runtime, tools) if attempt == retry.max_retries or not trace_should_retry(trace, retry): break if runtime is not None: @@ -363,7 +363,7 @@ class _EpisodeAgent(Agent): they're created, finished ones land in `completed` (the episode's traces), each run takes the eval's gate. The taskset's shared tool servers ride only its own tasks — on an env-minted task they'd wrongly put MCP in play - (`shared_tools=` overrides).""" + (`tools=` overrides).""" def __init__( self, @@ -414,15 +414,13 @@ async def run( task: Task, *, runtime: Runtime | None = None, - shared_tools: Mapping[str, SharedToolServer] | None = None, + tools: Mapping[str, SharedToolServer] | None = None, ) -> Trace: async with self._gate or nullcontext(): trace = await super().run( task, runtime=runtime, - shared_tools=shared_tools - if shared_tools is not None - else self._shared_for(task), + tools=tools if tools is not None else self._shared_for(task), ) self._completed.append(trace) return trace