fix(anthropic): narrow stream block index guard · openclaw/openclaw@d37300f
vincentkoc
·
2026-06-23
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -1482,7 +1482,7 @@ export function createAnthropicMessagesTransportStreamFn(): StreamFn {
|
1482 | 1482 | const eventIndex = typeof event.index === "number" ? event.index : undefined; |
1483 | 1483 | const index = eventIndex === undefined ? undefined : blockIndexes.get(eventIndex); |
1484 | 1484 | const block = index === undefined ? undefined : blocks[index]; |
1485 | | -if (index === undefined || !block) { |
| 1485 | +if (eventIndex === undefined || index === undefined || !block) { |
1486 | 1486 | finishReasoningContentSidecars(event.index); |
1487 | 1487 | continue; |
1488 | 1488 | } |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。