fix: harden responses streaming and tool-call fallback
Ensure /v1/responses streams always terminate with response.completed and normalize Lingma tool_code fallbacks into structured tool calls, including single-argument forms. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -187,6 +187,17 @@ class ConfigParsingTests(unittest.TestCase):
|
||||
settings_without_accounts = load_settings()
|
||||
|
||||
self.assertEqual(settings_without_accounts.instance_count, 1)
|
||||
def test_load_settings_parses_tool_allowlist_csv(self) -> None:
|
||||
with patch.dict(os.environ, {"TOOL_ALLOWLIST": " lookup , write_file ,,search_docs "}, clear=True):
|
||||
settings = load_settings()
|
||||
|
||||
self.assertEqual(settings.tool_allowlist, ["lookup", "write_file", "search_docs"])
|
||||
|
||||
def test_load_settings_empty_tool_allowlist(self) -> None:
|
||||
with patch.dict(os.environ, {"TOOL_ALLOWLIST": " , , "}, clear=True):
|
||||
settings = load_settings()
|
||||
|
||||
self.assertEqual(settings.tool_allowlist, [])
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
Reference in New Issue
Block a user