Skip to content

Allow callers to omit strict and parameters from FunctionToolParam #4350

Backlog

Description

@marcuswood-oai

Thanks to the author of #2576 for flagging strict. The same mismatch affects parameters. The Responses API requires only type and name for a function tool. The generated FunctionToolParam lets callers set either field to None, but a type checker requires both keys to be present.

from openai.types.responses import FunctionToolParam

tool: FunctionToolParam = {"type": "function", "name": "get_current_time"}

Update the source schema used to generate the SDK so callers can omit either key independently or both together. Verify that the example type-checks, omitted keys stay absent on the wire, and explicit values such as strict=False and a parameter schema are preserved.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions