replace erroneous rstrip() with removesuffix() (#8024)

This commit is contained in:
Chase 2025-04-22 15:50:14 -07:00 committed by GitHub
parent 693c72d670
commit 5d749aeba7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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: