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
to_strict_json_schema iterated a string-valued required character by character, so a malformed required kept same-named properties non-nullable while the TypeScript implementation treats it as absent and widens every property. Both SDKs now agree. Co-authored-by: AseemPrasad <aseemprasad0520@gmail.com> Claude-Session: https://claude.ai/code/session_01TDrxCHn2hg51HmxVstSUgs
jkomyno committed
Aug 26, 2026 at 17:37 UTC
e4d24bc04baf3b88fefaf5bd203426149b512110
1 file changed
+4
-1
python/composio/utils/strict_schema.py
+4
-1
@@ -272,8 +272,11 @@ class _Walker:
272
return out
273
274
properties: dict[str, t.Any] = dict(out.get("properties") or {})
275
+ required = out.get("required")
276
declared_required = {
276
- entry for entry in out.get("required") or [] if isinstance(entry, str)
277
+ entry
278
+ for entry in (required if isinstance(required, list) else [])
279
+ if isinstance(entry, str)
280
}
281
for name, property_schema in properties.items():
282
if name in declared_required or not isinstance(property_schema, dict):