Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
Mirrored from https://github.com/Camo67/composio.git
Synced Nov 21, 18:30 UTC
fix(python): handle title-less top-level schemas (#3325)
## Summary Fixes `json_schema_to_model` when a top-level JSON schema omits `title` or sets it to `null`. This is the remaining direct-helper path; anonymous nested objects from #2435 are already handled by `schema_converter.py`. - falls back to `GeneratedModel` only when the title is `None`, preserving intentionally empty string titles - adds regression coverage for missing, `null`, and empty titles, model construction, and required-field validation ## Validation - `ruff format --check python/composio/utils/shared.py python/tests/test_schema_parser.py` - `ruff check python/composio/utils/shared.py python/tests/test_schema_parser.py` - `PYTHONPATH="$PWD/python" /Users/jkomyno/work/composio/composio2/.venv/bin/pytest -q python/tests/test_schema_parser.py` This is a follow-up to #2435; it intentionally does not close that already-resolved issue. Co-authored-by: jkomyno <alberto@composio.dev> Co-authored-by: Alberto Schiabel <jkomyno@users.noreply.github.com>