Changesets · Branches · Tags · Compare
| Changeset | 438b2c9c3ac05f5b50b77b8c4e0e412e336969a27aece960a7abc61e498c8844 |
|---|---|
| Author | Nate <sestinj@gmail.com> · 2025-08-21 08:50 -07:00 |
| Committer | Nate <sestinj@gmail.com> · 2025-08-21 08:50 -07:00 |
| Parents | 48bdf6762488 |
1 file changed
modified core/llm/openaiTypeConverters.ts +2 −2
| @@ -102,7 +102,7 @@ | ||
| 102 | 102 | |
| 103 | 103 | if (options.tools?.length) { |
| 104 | 104 | params.tools = options.tools |
| 105 | - .filter((tool) => tool.type === "function") | |
| 105 | + .filter((tool) => !tool.type || tool.type === "function") | |
| 106 | 106 | .map((tool) => ({ |
| 107 | 107 | type: tool.type, |
| 108 | 108 | function: { |
| @@ -161,7 +161,7 @@ | ||
| 161 | 161 | role: "assistant", |
| 162 | 162 | content: "", |
| 163 | 163 | toolCalls: message.tool_calls |
| 164 | - ?.filter((tc) => tc.type === "function") | |
| 164 | + ?.filter((tc) => !tc.type || tc.type === "function") | |
| 165 | 165 | .map((tc) => ({ |
| 166 | 166 | id: tc.id, |
| 167 | 167 | type: "function" as const, |