openai-python icon indicating copy to clipboard operation
openai-python copied to clipboard

fix(types): make id optional in ResponseFunctionToolCallParam

Open prdai opened this issue 9 months ago • 0 comments

This pull request addresses Issue #2205 by updating the ResponseFunctionToolCallParam type. Previously, the id field was defined as a required string, but this change makes it optional, aligning the type definition with the actual usage scenarios.

Changes Introduced:

  • Updated src/openai/types/responses/response_function_tool_call_param.py to change the id field from str to Optional[str].

Rationale:
The GitHub issue details confirm that making id optional aligns with the API spec. Users have successfully tested the functionality without supplying an id, which further validates this change. This update improves the type accuracy and usability of the library.

prdai avatar Mar 22 '25 04:03 prdai