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 invalid lookup to required fields in nested json
haxzie committed
Sep 29, 2025 at 15:37 UTC
4869206d47ab5bd472cbe4b482bfdbf6127753e2
1 file changed
+2
-8
python/composio/utils/shared.py
+2
-8
@@ -133,13 +133,7 @@ def json_schema_to_pydantic_field(
133
if not skip_default:
134
field["default"] = (
135
...
136
- if (
137
- name in required
138
- or json_schema.get(
139
- "required",
140
- False,
141
- )
142
- )
136
+ if name in required
137
else default
138
)
139
@@ -263,7 +257,7 @@ def pydantic_model_from_param_schema(param_schema: t.Dict) -> t.Type:
257
else:
258
field_kwargs["title"] = prop_title
259
266
- if prop_name in required_props or prop_info.get("required", False):
260
+ if prop_name in required_props:
261
required_fields[prop_name] = (
262
signature_prop_type,
263
Field(..., **field_kwargs),