diff --git a/backend/open_webui/utils/tools.py b/backend/open_webui/utils/tools.py index 6a0a7346bb..16f50dfb20 100644 --- a/backend/open_webui/utils/tools.py +++ b/backend/open_webui/utils/tools.py @@ -754,7 +754,7 @@ async def execute_tool_server( ) as session: request_method = getattr(session, http_method.lower()) - if http_method in ["post", "put", "patch"]: + if http_method in ["post", "put", "patch", "delete"]: async with request_method( final_url, json=body_params, diff --git a/src/lib/apis/index.ts b/src/lib/apis/index.ts index 43a5936a23..75a289d631 100644 --- a/src/lib/apis/index.ts +++ b/src/lib/apis/index.ts @@ -494,7 +494,10 @@ export const executeToolServer = async ( headers }; - if (['post', 'put', 'patch'].includes(httpMethod.toLowerCase()) && operation.requestBody) { + if ( + ['post', 'put', 'patch', 'delete'].includes(httpMethod.toLowerCase()) && + operation.requestBody + ) { requestOptions.body = JSON.stringify(bodyParams); }