@sunerpy/opencode-kiro-auth 0.5.0 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -241,12 +241,14 @@ export async function* transformSdkStream(sdkResponse, model, conversationId) {
|
|
|
241
241
|
}
|
|
242
242
|
}
|
|
243
243
|
if (toolCalls.length > 0) {
|
|
244
|
-
|
|
244
|
+
// OpenAI tool_calls[].index must be the tool call's own 0-based ordinal,
|
|
245
|
+
// NOT the Anthropic content_block global index (offset by reasoning/text
|
|
246
|
+
// blocks) — a global index misaligns the AI-SDK accumulator and drops the call.
|
|
245
247
|
for (let i = 0; i < toolCalls.length; i++) {
|
|
246
248
|
const tc = toolCalls[i];
|
|
247
249
|
if (!tc)
|
|
248
250
|
continue;
|
|
249
|
-
const blockIndex =
|
|
251
|
+
const blockIndex = i;
|
|
250
252
|
{
|
|
251
253
|
const _c = convertToOpenAI({
|
|
252
254
|
type: 'content_block_start',
|
|
@@ -216,12 +216,14 @@ export async function* transformKiroStream(response, model, conversationId) {
|
|
|
216
216
|
}
|
|
217
217
|
}
|
|
218
218
|
if (toolCalls.length > 0) {
|
|
219
|
-
|
|
219
|
+
// OpenAI tool_calls[].index must be the tool call's own 0-based ordinal,
|
|
220
|
+
// NOT the Anthropic content_block global index (offset by reasoning/text
|
|
221
|
+
// blocks) — a global index misaligns the AI-SDK accumulator and drops the call.
|
|
220
222
|
for (let i = 0; i < toolCalls.length; i++) {
|
|
221
223
|
const tc = toolCalls[i];
|
|
222
224
|
if (!tc)
|
|
223
225
|
continue;
|
|
224
|
-
const blockIndex =
|
|
226
|
+
const blockIndex = i;
|
|
225
227
|
{
|
|
226
228
|
const _c = convertToOpenAI({
|
|
227
229
|
type: 'content_block_start',
|