Commit 7781a25
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 9513a81 commit 7781a25
1 file changed
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
7 | 9 | | |
8 | 10 | | |
9 | 11 | | |
| |||
25 | 27 | | |
26 | 28 | | |
27 | 29 | | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
28 | 35 | | |
29 | 36 | | |
30 | 37 | | |
| |||
0 commit comments