Avoid top-level composition in tool schemas
This commit is contained in:
@@ -647,6 +647,17 @@ target: Agent(tag='地图导航')
|
||||
self.assertEqual(export_payload['record_count'], 1)
|
||||
self.assertTrue(table_exists)
|
||||
|
||||
def test_tool_schemas_avoid_top_level_composition_keywords(self) -> None:
|
||||
# 部分 Bedrock/Anthropic 兼容后端不接受顶层 anyOf/oneOf/allOf。
|
||||
blocked_keywords = {'anyOf', 'oneOf', 'allOf'}
|
||||
violations = [
|
||||
name
|
||||
for name, tool in default_tool_registry().items()
|
||||
if blocked_keywords.intersection(tool.parameters)
|
||||
]
|
||||
|
||||
self.assertEqual(violations, [])
|
||||
|
||||
def test_data_agent_tools_route_relative_outputs_to_session_output(self) -> None:
|
||||
with tempfile.TemporaryDirectory() as tmp_dir:
|
||||
root = Path(tmp_dir)
|
||||
|
||||
Reference in New Issue
Block a user