Skip to content

strict tool schema enforcement #2632

@richardhundt

Description

@richardhundt

Confirm this is an issue with the Python library and not an underlying OpenAI API

  • This is an issue with the Python library

Describe the bug

The OpenAI API allows non-strict tool schemas, but in validate_input_tools you just raise an exception if strict is not true. I've ended up writing my own client using httpx but I'd prefer to not have to maintain it, given that this just seems like an oversight. You're adding constraints which aren't present in the API.

To Reproduce

Just pass any non-strict tool schema.

Code snippets

OS

macOS

Python version

Python 3.10

Library version

all versions

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions