Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/lib/AbstractChatCompletionRunner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -341,8 +341,9 @@ export class AbstractChatCompletionRunner<

for (const tool_call of message.tool_calls) {
if (tool_call.type !== 'function') continue;
const tool_call_id = tool_call.id;
const { name, arguments: args } = tool_call.function;
// Some LLM providers may not populate tool_call.id; use function name as fallback
const tool_call_id = tool_call.id || name;
Comment thread
HAYDEN-OAI marked this conversation as resolved.
const fn = functionsByName[name];

if (!fn) {
Expand Down