fix(providers): preserve tool optionality in Responses requests

This commit is contained in:
chengyongru authored and chengyongru committed 2026-09-27 18:47:48 +08:00
1 parent f62e0da9f6
commit 932b06f0de
8 files changed
+127 -1

No files matched your search

@@ -279,7 +279,7 @@ def test_build_body_with_tools():
body = provider._build_body(
[{"role": "user", "content": "weather?"}], tools, None, 4096, 0.7, None, None,
)
assert body["tools"] == [{"type": "function", "name": "get_weather", "description": "", "parameters": {}}]
assert body["tools"] == [{"type": "function", "name": "get_weather", "description": "", "parameters": {}, "strict": False}]
assert body["tool_choice"] == "auto"