```diff
--- test_files/380-original.txt	2025-03-07 19:06:51
+++ test_files/380-modified.txt	2025-03-07 19:06:51
@@ -3,21 +3,30 @@
 """
 
 import typing as t
+import uuid
 from inspect import Parameter
 
-from pydantic.v1 import BaseModel, Field, create_model
-from pydantic.v1.fields import FieldInfo
+from pydantic import BaseModel, Field, create_model
+from pydantic.fields import FieldInfo
 
+from composio.utils.logging import get as get_logger
 
+
+logger = get_logger(__name__)
+
 PYDANTIC_TYPE_TO_PYTHON_TYPE = {
     "string": str,
     "integer": int,
     "number": float,
     "boolean": bool,
+    "array": t.List,
+    "object": t.Dict,
     "null": t.Optional[t.Any],
 }
 
-# Should be depricated,
+CONTAINER_TYPE = ("array", "object")
+
+# Should be deprecated,
 # required values will always be provided by users
 # Non-required values are nullable(None) if default value not provided.
 FALLBACK_VALUES = {
@@ -27,9 +36,12 @@
     "boolean": False,
     "object": {},
     "array": [],
+    "null": None,
 }
 
+reserved_names = ["validate"]
 
+
 def json_schema_to_pydantic_type(
     json_schema: t.Dict[str, t.Any],
 ) -> t.Union[t.Type, t.Optional[t.Any]]:
@@ -87,7 +99,7 @@
     name: str,
     json_schema: t.Dict[str, t.Any],
     required: t.List[str],
-) -> t.Tuple[t.Type, FieldInfo]:
+) -> t.Tuple[str, t.Type, FieldInfo]:
     """
     Converts a JSON schema property to a Pydantic field definition.
 
@@ -105,17 +117,31 @@
 
     examples = json_schema.get("examples", [])
     default = json_schema.get("default")
+
+    # Check if the field name is a reserved Pydantic name
+    if name in reserved_names:
+        name = f"{name}_"
+        alias = name
+    else:
+        alias = None
+
     return (
+        name,
         t.cast(
             t.Type,
             json_schema_to_pydantic_type(
                 json_schema=json_schema,
             ),
         ),
-        Field(
+        Field(  # type: ignore
             description=description,
             examples=examples,
-            default=... if name in required else default,
+            default=(
+                ...
+                if (name in required or json_schema.get("required", False))
+                else default
+            ),
+            alias=alias,
         ),
     )
 
@@ -136,10 +162,12 @@
     ```
 
     """
-    field_definitions = {
-        name: json_schema_to_pydantic_field(name, prop, json_schema.get("required", []))
-        for name, prop in json_schema.get("properties", {}).items()
-    }
+    field_definitions = {}
+    for name, prop in json_schema.get("properties", {}).items():
+        updated_name, pydantic_type, pydantic_field = json_schema_to_pydantic_field(
+            name, prop, json_schema.get("required", [])
+        )
+        field_definitions[updated_name] = (pydantic_type, pydantic_field)
     return field_definitions  # type: ignore
 
 
@@ -151,10 +179,12 @@
     :return: Pydantic `BaseModel` type
     """
     model_name = json_schema.get("title")
-    field_definitions = {
-        name: json_schema_to_pydantic_field(name, prop, json_schema.get("required", []))
-        for name, prop in json_schema.get("properties", {}).items()
-    }
+    field_definitions = {}
+    for name, prop in json_schema.get("properties", {}).items():
+        updated_name, pydantic_type, pydantic_field = json_schema_to_pydantic_field(
+            name, prop, json_schema.get("required", [])
+        )
+        field_definitions[updated_name] = (pydantic_type, pydantic_field)
     return create_model(model_name, **field_definitions)  # type: ignore
 
 
@@ -173,6 +203,9 @@
     """
     required_fields = {}
     optional_fields = {}
+    if "title" not in param_schema:
+        raise ValueError(f"Missing 'title' in param_schema: {param_schema}")
+
     param_title = str(param_schema["title"]).replace(" ", "")
     required_props = param_schema.get("required", [])
 
@@ -193,26 +226,36 @@
         prop_type = prop_info["type"]
         prop_title = prop_info["title"].replace(" ", "")
         prop_default = prop_info.get("default", FALLBACK_VALUES[prop_type])
-        if prop_type in PYDANTIC_TYPE_TO_PYTHON_TYPE:
+        if (
+            prop_type in PYDANTIC_TYPE_TO_PYTHON_TYPE
+            and prop_type not in CONTAINER_TYPE
+        ):
             signature_prop_type = PYDANTIC_TYPE_TO_PYTHON_TYPE[prop_type]
         else:
             signature_prop_type = pydantic_model_from_param_schema(prop_info)
 
-        if prop_name in required_props:
+        field_kwargs = {
+            "description": prop_info.get(
+                "description", prop_info.get("desc", prop_title)
+            ),
+        }
+
+        # Add alias if the field name is a reserved Pydantic name
+        if prop_name in reserved_names:
+            field_kwargs["alias"] = prop_name
+            field_kwargs["title"] = f"{prop_name}_"
+        else:
+            field_kwargs["title"] = prop_title
+
+        if prop_name in required_props or prop_info.get("required", False):
             required_fields[prop_name] = (
                 signature_prop_type,
-                Field(
-                    ...,
-                    title=prop_title,
-                    description=prop_info.get(
-                        "description", prop_info.get("desc", prop_title)
-                    ),
-                ),
+                Field(..., **field_kwargs),
             )
         else:
             optional_fields[prop_name] = (
                 signature_prop_type,
-                Field(title=prop_title, default=prop_default),
+                Field(default=prop_default, **field_kwargs),
             )
 
     if not required_fields and not optional_fields:
@@ -227,7 +270,7 @@
 
 def get_signature_format_from_schema_params(schema_params: t.Dict) -> t.List[Parameter]:
     """
-    Get function paramters signature(with pydantic field definition as default values)
+    Get function parameters signature(with pydantic field definition as default values)
     from schema parameters. Works like:
 
     def demo_function(
@@ -235,7 +278,7 @@
         repo: str),
     )
 
-    :param schema_params: A dictionary object containing schema params, with keys [properties, required ect.].
+    :param schema_params: A dictionary object containing schema params, with keys [properties, required etc.].
     :return: List of required and optional parameters
 
     Output Format:
@@ -252,8 +295,12 @@
     for param_name, param_schema in schema_params_object.items():
         param_type = param_schema.get("type", None)
         param_oneOf = param_schema.get("oneOf", None)
-        if param_oneOf is not None:
-            param_types = [ptype.get("type") for ptype in param_oneOf]
+        param_anyOf = param_schema.get("anyOf", None)
+        param_allOf = param_schema.get("allOf", None)
+        if param_allOf is not None and len(param_allOf) == 1:
+            param_type = param_allOf[0].get("type", None)
+        if param_oneOf is not None or param_anyOf is not None:
+            param_types = [ptype.get("type") for ptype in (param_oneOf or param_anyOf)]
             if len(param_types) == 1:
                 signature_param_type = PYDANTIC_TYPE_TO_PYTHON_TYPE[param_types[0]]
             elif len(param_types) == 2:
@@ -275,16 +322,21 @@
             param_default = param_schema.get("default", FALLBACK_VALUES[param_type])
         else:
             signature_param_type = pydantic_model_from_param_schema(param_schema)
-            param_default = param_schema.get("default", FALLBACK_VALUES[param_type])
+            if param_type is None or param_type == "null":
+                param_default = None
+            else:
+                param_default = param_schema.get("default", FALLBACK_VALUES[param_type])
 
         param_annotation = signature_param_type
+        is_required = param_name in required_params or param_schema.get(
+            "required", False
+        )
         param = Parameter(
             name=param_name,
             kind=Parameter.POSITIONAL_OR_KEYWORD,
             annotation=param_annotation,
-            default=Parameter.empty if param_name in required_params else param_default,
+            default=Parameter.empty if is_required else param_default,
         )
-        is_required = param_name in required_params
         if is_required:
             required_parameters.append(param)
         else:
@@ -296,7 +348,7 @@
     schema_params: t.Dict,
 ) -> t.List[Parameter]:
     """
-    Get function paramters signature(with pydantic field definition as default values)
+    Get function parameters signature(with pydantic field definition as default values)
     from schema parameters. Works like:
 
     def demo_function(
@@ -304,7 +356,7 @@
         repo: str=Field(..., description='The name of the repository without the `.git` extension.'),
     )
 
-    :param schema_params: A dictionary object containing schema params, with keys [properties, required ect.].
+    :param schema_params: A dictionary object containing schema params, with keys [properties, required etc.].
     :return: List of required and optional parameters
 
     Example Output Format:
@@ -330,8 +382,13 @@
             name=param_name,
             kind=Parameter.POSITIONAL_OR_KEYWORD,
             annotation=param_dtype,
-            default=parame_field,
+            default=parame_field.default,
         )
         all_parameters.append(param)
 
     return all_parameters
+
+
+def generate_request_id() -> str:
+    """Generate a unique request ID."""
+    return str(uuid.uuid4())
```
