Commit c258918
committed
Fix case-sensitive tool ID comparison in pruning logic
Previously, tool call IDs were compared using case-sensitive includes() checks,
which could cause re-processing of already pruned tools if the same ID appeared
with different casing from different providers.
This change normalizes IDs to lowercase before comparison using a Set for
efficient O(1) lookups instead of O(n) array includes() calls.1 parent 8d30228 commit c258918
1 file changed
+4
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
119 | | - | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
120 | 122 | | |
121 | 123 | | |
122 | 124 | | |
| |||
145 | 147 | | |
146 | 148 | | |
147 | 149 | | |
148 | | - | |
| 150 | + | |
149 | 151 | | |
150 | 152 | | |
151 | 153 | | |
| |||
0 commit comments