Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
Mirrored from https://github.com/Camo67/composio.git
Synced Nov 21, 06:00 UTC
| 1 | # OpenAI v7 + Zod v4 Compatibility Test |
| 2 | |
| 3 | Verifies that packed `@composio/core` and `@composio/openai` packages work with |
| 4 | `openai@7` and `zod@4`. |
| 5 | |
| 6 | ## Background |
| 7 | |
| 8 | Issue [#2336](https://github.com/ComposioHQ/composio/issues/2336) reported peer dependency conflicts for users with `zod@4`. |
| 9 | |
| 10 | ## What It Tests |
| 11 | |
| 12 | | Test | Description | |
| 13 | | ------------------- | --------------------------------------------------------- | |
| 14 | | npm install | Installs packed Composio packages with OpenAI 7 and Zod 4 | |
| 15 | | TypeScript | Checks exported provider types against OpenAI 7 | |
| 16 | | Package integration | Verifies all packages work together without conflicts | |
| 17 | | wrapTool | Confirms both OpenAI provider surfaces wrap tools | |
| 18 | |
| 19 | ## Fixture |
| 20 | |
| 21 | ``` |
| 22 | fixtures/ |
| 23 | ├── index.mjs # Offline runtime assertions |
| 24 | ├── index.ts # Exported-type compatibility checks |
| 25 | ├── package.json # Explicit OpenAI 7 and Zod 4 dependencies |
| 26 | └── tsconfig.json # Strict consumer compiler settings |
| 27 | ``` |
| 28 | |
| 29 | The setup phase packs the Composio packages, installs them with explicit |
| 30 | OpenAI 7 and Zod 4 versions, and typechecks without `skipLibCheck`. |
| 31 | |
| 32 | `@composio/json-schema-to-zod` is packed alongside `@composio/core` and |
| 33 | `@composio/openai` even though the fixture never imports it directly. `pnpm |
| 34 | pack` rewrites `@composio/core`'s `workspace:*` dependency on it to the exact |
| 35 | workspace version, so installing the core tarball alone makes npm fetch that |
| 36 | version from the registry. On a release branch the workspace version is the |
| 37 | one about to be published and does not exist yet, which fails the install. |
| 38 | Packing it locally keeps the fixture resolvable before publication. |
| 39 | |
| 40 | ## Setup |
| 41 | |
| 42 | The runtime phase constructs clients with fake keys and never makes a network |
| 43 | request. |
| 44 | |
| 45 | ## Isolation Tool |
| 46 | |
| 47 | **Docker** with Node.js versions: 22.23.5, 24.22.3, 26.13.1. |
| 48 | |
| 49 | ## Running |
| 50 | |
| 51 | ```bash |
| 52 | pnpm test:e2e |
| 53 | ``` |