Repository navigation
Commit 486840c
fix(opencode): replace zodToJsonSchema with z.toJSONSchema for Zod v4 compat
zodToJsonSchema from [email protected] produces incorrect output
with Zod v4 schemas (returns {"type":"string"} for object schemas,
losing all properties and descriptions). Switch the experimental tools
API endpoint to z.toJSONSchema() which is Zod v4's built-in converter
and correctly preserves .describe() metadata.
Fixes anomalyco#20807
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>1 parent 8daeacc commit 486840c
1 file changed
Lines changed: 5 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
12 | 11 | | |
13 | 12 | | |
14 | 13 | | |
| |||
83 | 82 | | |
84 | 83 | | |
85 | 84 | | |
86 | | - | |
87 | | - | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
88 | 90 | | |
89 | 91 | | |
90 | 92 | | |
| |||
0 commit comments