Skip to content

Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.

fix(python): treat a non-array required as absent under strict mode

jkomynoe4d24bc04baf
diff --git a/python/composio/utils/strict_schema.py b/python/composio/utils/strict_schema.py
index 706c74794..f591953d5 100644
--- a/python/composio/utils/strict_schema.py
+++ b/python/composio/utils/strict_schema.py
@@ -272,8 +272,11 @@ class _Walker:
return out
properties: dict[str, t.Any] = dict(out.get("properties") or {})
+ required = out.get("required")
declared_required = {
- entry for entry in out.get("required") or [] if isinstance(entry, str)
+ entry
+ for entry in (required if isinstance(required, list) else [])
+ if isinstance(entry, str)
}
for name, property_schema in properties.items():
if name in declared_required or not isinstance(property_schema, dict):