fix(pi): report incomplete runs and model stream failures

This commit is contained in:
Sycun committed 2026-11-19 16:14:59 +08:00
1 parent b6f755717b
commit 87b41cd4b1
16 files changed
+309 -95

No files matched your search

+1 -5
View File
@@ -302,11 +302,7 @@ func (h *AgentHandler) executeOneBatchSubTask(queueID string, queue *BatchTaskQu
if useBatchMulti {
agentMode = "batch_agent_" + batchOrch
}
decision := h.decideAgentRunForDeliveryWithPolicy(conversationID, assistantMessageID, agentMode, resultMA, mcpIDs, false)
autoCancelledPendingExecutionIDs := h.cleanupPendingToolExecutionsAfterIteration(taskCtx, conversationID, decision, progressCallback)
if len(autoCancelledPendingExecutionIDs) > 0 {
decision = h.decideAgentRunForDeliveryWithPolicy(conversationID, assistantMessageID, agentMode, resultMA, mcpIDs, false)
}
decision, autoCancelledPendingExecutionIDs := h.decideAgentRunForDeliveryAndCleanup(taskCtx, conversationID, assistantMessageID, agentMode, resultMA, mcpIDs, false, progressCallback)
h.persistFinalizationDecision(conversationID, assistantMessageID, agentMode, mcpIDs, reasoningContent, decision)
resText := decision.FinalText
if !decision.Finalizable {