Commit e442a2c
fix: support both EnhancedTool and API tool types in getResponse
Allow getResponse to accept either EnhancedTool[] (with Zod schemas and
execute functions) or the standard API tool union types. The function now:
1. Detects tool type by checking for inputSchema in first tool
2. Converts EnhancedTool[] to API format for the request
3. Passes only EnhancedTools to ResponseWrapper for auto-execution
4. Allows standard API tools to pass through unchanged
This resolves TypeScript errors in CI where tools were incorrectly
constrained to only EnhancedTool type.
All tests pass (21 passed, 2 skipped).
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent 71dff17 commit e442a2c
2 files changed
+19
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | | - | |
78 | | - | |
| 77 | + | |
| 78 | + | |
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
85 | | - | |
86 | | - | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
87 | 95 | | |
88 | 96 | | |
89 | | - | |
| 97 | + | |
90 | 98 | | |
91 | 99 | | |
92 | | - | |
| 100 | + | |
93 | 101 | | |
94 | 102 | | |
95 | 103 | | |
| |||
103 | 111 | | |
104 | 112 | | |
105 | 113 | | |
106 | | - | |
107 | | - | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
108 | 117 | | |
109 | 118 | | |
110 | 119 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
122 | | - | |
123 | | - | |
| 122 | + | |
| 123 | + | |
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
| |||
0 commit comments