Skip to content

Conversation

@vm0809
Copy link

@vm0809 vm0809 commented Nov 8, 2025

Description
Adds strict JSON schema support for tool definitions to match Python implementation and OpenAI standards.

Changes

  • Added strict parameter to zodSchemaToJsonSchema (default: true)
  • Implemented ensureStrictJsonSchema helper function
  • Updated toJsonSchema and oaiParams to support strict mode
  • Set strict: true by default for consistency with Python version

Testing

  • Manual testing with various schema types
  • Verified strict mode prevents additional properties
  • Confirmed backward compatibility

Fixes #805

- Add 'strict' parameter to zodSchemaToJsonSchema function (default: true)
- Implement ensureStrictJsonSchema helper based on OpenAI's implementation
- Update toJsonSchema and oaiParams functions to support strict mode
- Set strict: true by default to match Python version behavior
- Fixes livekit#805 - enable strict JSON schema validation for tool definitions

This brings parity with the Python implementation and OpenAI's function calling standards
@changeset-bot
Copy link

changeset-bot bot commented Nov 8, 2025

⚠️ No Changeset found

Latest commit: 5ca73b1

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

- Add 'strict' parameter to zodSchemaToJsonSchema function (default: true)
- Implement ensureStrictJsonSchema helper based on OpenAI's implementation
- Update toJsonSchema and oaiParams functions to support strict mode
- Set strict: true by default to match Python version behavior
- Fixes livekit#805 - enable strict JSON schema validation for tool definitions

This brings parity with the Python implementation and OpenAI's function calling standards
- Add 'strict' parameter to zodSchemaToJsonSchema function (default: true)
- Implement ensureStrictJsonSchema helper based on OpenAI's implementation
- Update toJsonSchema and oaiParams functions to support strict mode
- Set strict: true by default to match Python version behavior
- Fixes livekit#805 - enable strict JSON schema validation for tool definitions

This brings parity with the Python implementation and OpenAI's function calling standards
- Add 'strict' parameter to zodSchemaToJsonSchema function (default: true)
- Implement ensureStrictJsonSchema helper based on OpenAI's implementation
- Update toJsonSchema and oaiParams functions to support strict mode
- Set strict: true by default to match Python version behavior
- Fixes livekit#805 - enable strict JSON schema validation for tool definitions

This brings parity with the Python implementation and OpenAI's function calling standards
- Add 'strict' parameter to zodSchemaToJsonSchema function (default: true)
- Implement ensureStrictJsonSchema helper based on OpenAI's implementation
- Update toJsonSchema and oaiParams functions to support strict mode
- Set strict: true by default to match Python version behavior
- Fixes livekit#805 - enable strict JSON schema validation for tool definitions

This brings parity with the Python implementation and OpenAI's function calling standards
- Add 'strict' parameter to zodSchemaToJsonSchema function (default: true)
- Implement ensureStrictJsonSchema helper based on OpenAI's implementation
- Update toJsonSchema and oaiParams functions to support strict mode
- Set strict: true by default to match Python version behavior
- Fixes livekit#805 - enable strict JSON schema validation for tool definitions

This brings parity with the Python implementation and OpenAI's function calling standards
- Add 'strict' parameter to zodSchemaToJsonSchema function (default: true)
- Implement ensureStrictJsonSchema helper based on OpenAI's implementation
- Update toJsonSchema and oaiParams functions to support strict mode
- Set strict: true by default to match Python version behavior
- Fixes livekit#805 - enable strict JSON schema validation for tool definitions

This brings parity with the Python implementation and OpenAI's function calling standards
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

no support for strict tool schema definitions

1 participant