You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have noticed an inconsistency between the documentation and the actual implementation of the function_tool decorator in the OpenAI Agents Python SDK.
TypeError: function_tool() got an unexpected keyword argument 'strict_mode'
Environment Details:
Python Version: 3.12.2
OpenAI Agents SDK Version: Latest (as of March 18, 2025)
Code Example:
fromagentsimportfunction_tool@function_tool(strict_mode=True)asyncdefobtener_clima(ciudad: str) ->str:
""" Obtains the current weather for a specified city. Args: ciudad (str): Name of the city. Returns: str: Description of the current weather. """# Logic to retrieve weather informationreturnf"The weather in {ciudad} is sunny and 25°C."
Error Encountered:
TypeError: function_tool() got an unexpected keyword argument 'strict_mode'
Request for Clarification:
Documentation Accuracy: Could you please confirm whether the strict_mode parameter is intended to be part of the function_tool decorator? If it is, could you provide guidance on the correct usage or update the documentation to reflect the current implementation?
Enforcing Parameter Requirements: How can I ensure that functions defined as tools strictly require certain parameters? Specifically, if a user invokes a function without providing all necessary arguments, how can the system prompt them to supply the missing information? I believe the strict_mode parameter was intended for this purpose, but its absence in the current implementation leaves this aspect unclear.
Thank you for your attention to this matter. Any guidance or updates would be greatly appreciated.
The text was updated successfully, but these errors were encountered:
I have noticed an inconsistency between the documentation and the actual implementation of the
function_tool
decorator in the OpenAI Agents Python SDK.Issue Description:
The [official documentation](https://openai.github.io/openai-agents-python/ref/tool/) references a
strict_mode
parameter for thefunction_tool
decorator. However, when attempting to use this parameter in my code, I encounter the following error:Environment Details:
Code Example:
Error Encountered:
Request for Clarification:
Documentation Accuracy: Could you please confirm whether the
strict_mode
parameter is intended to be part of thefunction_tool
decorator? If it is, could you provide guidance on the correct usage or update the documentation to reflect the current implementation?Enforcing Parameter Requirements: How can I ensure that functions defined as tools strictly require certain parameters? Specifically, if a user invokes a function without providing all necessary arguments, how can the system prompt them to supply the missing information? I believe the
strict_mode
parameter was intended for this purpose, but its absence in the current implementation leaves this aspect unclear.Thank you for your attention to this matter. Any guidance or updates would be greatly appreciated.
The text was updated successfully, but these errors were encountered: