Skip to content

Commit d727d0f

Browse files
committed
set termination reason and error message
1 parent b6f6b7f commit d727d0f

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

eval_protocol/mcp/execution/manager.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ async def _execute_with_semaphore(idx):
163163
evaluation_rows[idx].input_metadata.row_id = envs.dataset_rows[idx].id
164164
evaluation_rows[idx].input_metadata.dataset_info = asdict(envs.dataset_rows[idx])
165165
evaluation_rows[idx].tools = shared_tool_schema
166-
evaluation_rows[idx].usage = trajectory.usage
166+
evaluation_rows[idx].usage = CompletionUsage(**trajectory.usage)
167167
evaluation_rows[idx].input_metadata.completion_params = CompletionParams(
168168
model=policy.model_id,
169169
temperature=getattr(policy, "temperature", None),
@@ -306,6 +306,8 @@ async def _execute_rollout(
306306
# If there's no user simulator, no tool call means policy failed and we should terminate the rollout
307307
elif tool_calls[0].tool_name in ["_playback_terminate", "_no_tool_call"]:
308308
trajectory.terminated = True
309+
trajectory.termination_reason = TerminationReason.ERROR
310+
trajectory.control_plane_summary.update({"error_message": "No expected tool call"})
309311
break
310312

311313
# Execute each tool call sequentially

0 commit comments

Comments
 (0)