Commit 1c23d62
committed
Simplify tool schema transformation for OpenAI strict mode
OpenAI's Structured Outputs requires all properties to be in the
'required' array, even optional ones (which use nullable types).
The simplified transformation:
- Only ensures all properties are listed in required array
- Recursively processes nested objects and array items
- Doesn't modify type definitions (already correct in our tools)
- Much simpler than the original complex transformation1 parent 807c414 commit 1c23d62
1 file changed
+33
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
190 | 190 | | |
191 | 191 | | |
192 | 192 | | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
193 | 225 | | |
194 | 226 | | |
195 | 227 | | |
| |||
266 | 298 | | |
267 | 299 | | |
268 | 300 | | |
269 | | - | |
| 301 | + | |
270 | 302 | | |
271 | 303 | | |
272 | 304 | | |
| |||
0 commit comments