From c29cb503beb3d1b440a7faef680ddadff4be5ecd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=8D=E5=A6=82=E5=BD=92=E5=8E=BB?= Date: Mon, 2 Jun 2025 18:09:01 +0800 Subject: [PATCH] Fix #20536: Force header in custom tool be string (#20537) Co-authored-by: Peter Xin --- api/core/tools/custom_tool/tool.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/core/tools/custom_tool/tool.py b/api/core/tools/custom_tool/tool.py index 2f2f1ebbdd..2f5cc6d4c0 100644 --- a/api/core/tools/custom_tool/tool.py +++ b/api/core/tools/custom_tool/tool.py @@ -168,7 +168,7 @@ class ApiTool(Tool): cookies[parameter["name"]] = value elif parameter["in"] == "header": - headers[parameter["name"]] = value + headers[parameter["name"]] = str(value) # check if there is a request body and handle it if "requestBody" in self.api_bundle.openapi and self.api_bundle.openapi["requestBody"] is not None: