From 5d749aeba795d026cc1eb14339955752ebd35346 Mon Sep 17 00:00:00 2001 From: Chase Date: Tue, 22 Apr 2025 15:50:14 -0700 Subject: [PATCH] replace erroneous rstrip() with removesuffix() (#8024) --- openhands/agenthub/codeact_agent/function_calling.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openhands/agenthub/codeact_agent/function_calling.py b/openhands/agenthub/codeact_agent/function_calling.py index 1b8a34fff2..023acca660 100644 --- a/openhands/agenthub/codeact_agent/function_calling.py +++ b/openhands/agenthub/codeact_agent/function_calling.py @@ -199,7 +199,7 @@ def response_to_actions(response: ModelResponse) -> list[Action]: # ================================================ elif tool_call.function.name.endswith(MCPClientTool.postfix()): action = McpAction( - name=tool_call.function.name.rstrip(MCPClientTool.postfix()), + name=tool_call.function.name.removesuffix(MCPClientTool.postfix()), arguments=tool_call.function.arguments, ) else: