From 089ea415ab9f597ab57a1ea21a3178d981b77b56 Mon Sep 17 00:00:00 2001 From: jnjpng Date: Mon, 12 Jan 2026 15:41:05 -0800 Subject: [PATCH] fix: update test_tool_schema_parsing.py to use requests.post directly (#8625) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The `make_post_request` function was removed in commit b1bbf9aabf as part of cleaning up unused sync code, but the test file still imported it. This change replaces the removed function with direct `requests.post` calls. 🐾 Generated with [Letta Code](https://letta.com) Co-authored-by: Letta --- tests/test_tool_schema_parsing.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/test_tool_schema_parsing.py b/tests/test_tool_schema_parsing.py index 1083982f..6db95e05 100644 --- a/tests/test_tool_schema_parsing.py +++ b/tests/test_tool_schema_parsing.py @@ -7,11 +7,12 @@ import time from functools import partial import pytest +import requests from pydantic import BaseModel from letta.functions.functions import derive_openai_json_schema from letta.functions.schema_generator import validate_google_style_docstring -from letta.llm_api.helpers import convert_to_structured_output, make_post_request +from letta.llm_api.helpers import convert_to_structured_output from letta.schemas.tool import Tool, ToolCreate @@ -185,7 +186,8 @@ def _openai_payload(test_config): "parallel_tool_calls": False, } - make_post_request(url, headers, data) + response = requests.post(url, headers=headers, json=data) + response.raise_for_status() success = True except Exception as e: @@ -306,7 +308,8 @@ def _run_pydantic_args_test(filename, openai_model, structured_output): "parallel_tool_calls": False, } - make_post_request(url, headers, data) + response = requests.post(url, headers=headers, json=data) + response.raise_for_status() return (filename, True, None) # Success except Exception as e: return (filename, False, str(e)) # Failure with error message