Skip to content

Conversation

@ianduvall
Copy link
Contributor

@ianduvall ianduvall commented Jul 30, 2025

Summary

Moves zod to be a peer dependency as suggested by the zod maintainer

Test plan

TBD

  • One idea is we publish an experimental release and then use that in a sandbox with the failing test cases to validate the fix is working as expected.

Issue number

Closes #187

Checks

  • I've added new tests (if relevant)
  • I've added/updated the relevant documentation
  • I've run pnpm test and pnpm test:examples
    • (If you made a major change) I've run pnpm test:integration (see details)
  • I've made sure tests pass
  • I've added a changeset using pnpm changeset to indicate my changes

@changeset-bot
Copy link

changeset-bot bot commented Jul 30, 2025

⚠️ No Changeset found

Latest commit: 87e64b9

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

@ianduvall ianduvall force-pushed the fix/zod-packaging branch from 7cffa9e to aa11304 Compare July 30, 2025 23:56
@ianduvall
Copy link
Contributor Author

@seratch tagging you for review

@seratch
Copy link
Member

seratch commented Aug 4, 2025

@ianduvall Thanks for sending this PR! I don't have the bandwidth to carefully check this issue right now, but will start working on this soon.

@pungoyal
Copy link

pungoyal commented Aug 9, 2025

@ianduvall you should be changing the relevant readme files as well?

@dcsan
Copy link

dcsan commented Aug 13, 2025

@ianduvall this seems to have some conflicts now

how would this be used? npm install @openai/agents
and then separately install zod?

would that allow different submodules to still use higher versions if they specify as a peer-dep?

@dcsan dcsan mentioned this pull request Aug 13, 2025
@ianduvall
Copy link
Contributor Author

how would this be used? npm install @openai/agents and then separately install zod?

Yep

would that allow different submodules to still use higher versions if they specify as a peer-dep?

You would need to stay within the supported version range. A follow up to this PR would be to add support for Zod v4.

@ianduvall
Copy link
Contributor Author

@ianduvall you should be changing the relevant readme files as well?

I'll leave that for the end to avoid conflicts

@seratch
Copy link
Member

seratch commented Aug 15, 2025

@ianduvall Thanks for working on this. I found that this PR needs an additional commit, so I come up with #342 including your contributions.

@seratch seratch closed this Aug 15, 2025
@ianduvall ianduvall deleted the fix/zod-packaging branch August 15, 2025 15:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Agent outputType type error with [email protected]+

4 participants