Commit a854960
Add sanitization to auto-generated output tool name
From #2929
We ensure that auto-generated tool output names are properly sanitized
so they conform to `[a-zA-Z0-9-_]`. All characters not in this pattern
will simply be ignored/skipped in the final name.
The error was first remarked when using generic classes as `output_type`,
where brackets in the tool name would be rejected by the provider API.
Added snapshot test to verify the sanitized tool names are generated
correctly from generic types like Result[StringData] and Result[int].
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>1 parent 3099d13 commit a854960
1 file changed
+1
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
665 | 665 | | |
666 | 666 | | |
667 | 667 | | |
668 | | - | |
669 | 668 | | |
670 | | - | |
671 | | - | |
672 | | - | |
673 | | - | |
674 | | - | |
| 669 | + | |
675 | 670 | | |
676 | 671 | | |
677 | 672 | | |
| |||
0 commit comments