Commit b445f0b
Fix tool name sanitization to preserve uppercase letters
The previous regex pattern `[^a-z0-9-_]` was removing uppercase letters
from class names, causing test failures. For example, "Foo" became "oo".
This fix changes the pattern to `[^a-zA-Z0-9-_]` to preserve both
uppercase and lowercase letters while still removing invalid characters
like brackets from generic type names (e.g., `Result[StringData]`).
Also adds a test case to verify that generic class names with brackets
are properly sanitized while preserving valid characters.
Fixes test failures in test_response_multiple_return_tools and related tests.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>1 parent a53d87a commit b445f0b
2 files changed
+41
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | | - | |
| 74 | + | |
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
632 | 632 | | |
633 | 633 | | |
634 | 634 | | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
635 | 675 | | |
636 | 676 | | |
637 | 677 | | |
| |||
0 commit comments