diff --git a/eval_protocol/mcp/execution/base_policy.py b/eval_protocol/mcp/execution/base_policy.py index 22bad57e..819b33dd 100644 --- a/eval_protocol/mcp/execution/base_policy.py +++ b/eval_protocol/mcp/execution/base_policy.py @@ -182,7 +182,7 @@ async def _generate_live_tool_calls( # This is crucial for proper tool call ID management in add_tool_response assistant_message_for_history = { "role": "assistant", - "content": response["choices"][0]["message"]["content"], + "content": response["choices"][0]["message"].get("content", ""), } usage_stats = CompletionUsage( prompt_tokens=response["usage"]["prompt_tokens"],