Commit 6253a24
committed
fix(sequential-thinking): keep nextThoughtNeeded in inputSchema.required
The coercedBoolean helper used z.preprocess(), which produces a schema whose
input type accepts 'unknown'. zod-to-JSON-Schema conversion treats 'unknown'
inputs as optional and drops the field from the emitted 'required' list,
creating a mismatch between the advertised schema and runtime validation.
Replace z.preprocess with a z.union([z.boolean(), z.enum(...).transform(...)])
that preserves string coercion while keeping the field in the required list.
Fixes #46511 parent 599dafc commit 6253a24
1 file changed
Lines changed: 8 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| |||
0 commit comments