Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
default to any if type not found in schema
Jayesh Sharma committed
Sep 3, 2025 at 18:05 UTC
642d9162a54fe52fc5fa9924cf604aa44fbf6c4d
1 file changed
+4
-1
python/composio/utils/openapi.py
+4
-1
@@ -87,7 +87,10 @@ def function_signature_from_jsonschema(
87
elif "type" in p_schema:
88
p_type = _type_to_parameter(schema=p_schema)
89
else:
90
- raise InvalidSchemaError(f"Invalid property object {p_name}: {p_schema!r}")
90
+ # Handle cases where no type is specified (e.g., Pydantic's Any type)
91
+ # This typically happens when using typing.Any in Pydantic models,
92
+ # which intentionally omits the 'type' field in JSON schema
93
+ p_type = t.Any
94
95
p_val = p_schema.get("default", None)
96
if p_name in required or p_schema.get("required", False) or skip_default: