Description
When generating params_json_schema for tool definitions, the current implementation incorrectly includes all parameters in the required array, regardless of whether they are truly mandatory.
This behavior may lead to unexpected or erroneous tool-calling behavior in downstream models. For example, the model may be forced to supply values for optional parameters, and in practice it often fills them with fallback values such as empty strings (""), zero (0), or literal "null" strings. This can degrade tool performance and cause hard-to-debug failures in production.
Expected Behavior
Only parameters that are explicitly marked as required should appear in the required field of the generated JSON Schema. Optional parameters should remain absent from the required array and should not be forced by the schema.
Description
When generating params_json_schema for tool definitions, the current implementation incorrectly includes all parameters in the required array, regardless of whether they are truly mandatory.
This behavior may lead to unexpected or erroneous tool-calling behavior in downstream models. For example, the model may be forced to supply values for optional parameters, and in practice it often fills them with fallback values such as empty strings (""), zero (0), or literal "null" strings. This can degrade tool performance and cause hard-to-debug failures in production.
Expected Behavior
Only parameters that are explicitly marked as required should appear in the required field of the generated JSON Schema. Optional parameters should remain absent from the required array and should not be forced by the schema.