on main help sign in
fix: add else
49a1e21kujtimiihoxha
internal/llm/provider/openai.go+2−1
@@ -374,8 +374,9 @@ func (o *openaiClient) stream(ctx context.Context, messages []message.Message, t
374 newID := uuid.NewString()
374 newID := uuid.NewString()
375 toolCallIDMap[toolCall.ID] = newID
375 toolCallIDMap[toolCall.ID] = newID
376 toolCall.ID = newID
376 toolCall.ID = newID
377+ } else {
378+ toolCall.ID = exID
377 }
379 }
378− toolCall.ID = exID
379 }
380 }
380 newToolCall := false
381 newToolCall := false
381 if existingToolCall, ok := msgToolCalls[toolCall.Index]; ok { // tool call exists
382 if existingToolCall, ok := msgToolCalls[toolCall.Index]; ok { // tool call exists