Commit a113bad
committed
fix(ai): forward tool strict mode in toolsToModelTools
The core AI SDK's `prepareToolsAndToolChoice` already forwards
`tool.strict` when building `LanguageModelV2FunctionTool` objects,
but `@workflow/ai`'s `toolsToModelTools` does not.
This means tools with `strict: true` lose that flag when run
through DurableAgent, causing providers that support strict
schema validation to fall back to non-strict mode.
Align with the AI SDK by conditionally spreading `strict` when
the tool defines it.1 parent bfb1a60 commit a113bad
1 file changed
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
| 5 | + | |
4 | 6 | | |
5 | 7 | | |
6 | 8 | | |
| |||
10 | 12 | | |
11 | 13 | | |
12 | 14 | | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
13 | 20 | | |
14 | 21 | | |
15 | 22 | | |
0 commit comments