@matingathani is attempting to deploy a commit to the Composio Team on Vercel.
A member of the Team first needs to authorize it.
Fixes a crash in json_schema_to_model when a JSON schema has no title field.
Root cause: json_schema_to_model calls create_model(model_name, ...) where model_name = json_schema.get("title"). When title is absent, model_name is None, and Pydantic raises:
TypeError: type.__new__() argument 1 must be str, not None
This hits in practice when LangGraph/LangChain/CrewAI providers wrap tools whose parameter schemas contain anonymous nested objects — for example, array-item schemas that have no explicit title key.
Fix: Fall back to "GeneratedModel" when title is absent, matching the convention already used in schema_converter.py for the same purpose.
Stack trace from the issue:
File ".../composio/utils/shared.py", line 194
return create_model(model_name, **field_definitions)
^
model_name is None (should be a string)
json_schema_to_model with no title creates a valid model (no crash)pytest tests/test_schema_parser.py — 67 tests)pytest tests/ — 592 tests)ruff check)Closes #2435
@matingathani is attempting to deploy a commit to the Composio Team on Vercel.
A member of the Team first needs to authorize it.