[eval]: disable MCP for SWE-Bench evaluation (#8574)

Co-authored-by: openhands <openhands@all-hands.dev>
Co-authored-by: Engel Nyst <enyst@users.noreply.github.com>
Co-authored-by: Engel Nyst <engel.nyst@gmail.com>
This commit is contained in:
Xingyao Wang
2025-05-19 09:32:46 +08:00
committed by GitHub
parent 0b26174d60
commit 2ecc39ffcc
7 changed files with 13 additions and 3 deletions

View File

@@ -28,6 +28,8 @@ class AgentConfig(BaseModel):
"""Whether to enable finish tool"""
enable_prompt_extensions: bool = Field(default=True)
"""Whether to enable prompt extensions"""
enable_mcp: bool = Field(default=True)
"""Whether to enable MCP tools"""
disabled_microagents: list[str] = Field(default_factory=list)
"""A list of microagents to disable (by name, without .py extension, e.g. ["github", "lint"]). Default is None."""
enable_history_truncation: bool = Field(default=True)

View File

@@ -129,7 +129,8 @@ async def run_controller(
)
# Add MCP tools to the agent
await add_mcp_tools_to_agent(agent, runtime, memory, config.mcp)
if agent.config.enable_mcp:
await add_mcp_tools_to_agent(agent, runtime, memory, config.mcp)
replay_events: list[Event] | None = None
if config.replay_trajectory_path: