{"record":{"id":"ea71875612ce8b3d","repo":"earendil-works/pi","slug":"request-was-aborted-ea7187","errorCode":null,"errorMessage":"Request was aborted","messagePattern":"Request was aborted","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/ai/src/api/openai-completions.ts","lineNumber":639,"sourceCode":"\t\t\t\t\tif (Array.isArray(reasoningDetails)) {\n\t\t\t\t\t\tfor (const detail of reasoningDetails) {\n\t\t\t\t\t\t\tif (!isOpenAIReasoningDetail(detail)) continue;\n\t\t\t\t\t\t\tconst block = ensureThinkingBlock(\"\");\n\t\t\t\t\t\t\tconst preservedDetails = parseOpenAIReasoningDetails(block.thinkingSignature) ?? [];\n\t\t\t\t\t\t\tpreservedDetails.push(detail);\n\t\t\t\t\t\t\t// Keep provider replay data in the existing signature slot. OpenRouter\n\t\t\t\t\t\t\t// requires the complete reasoning_details sequence in its original order.\n\t\t\t\t\t\t\tblock.thinkingSignature = JSON.stringify(preservedDetails);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor (const block of blocks) {\n\t\t\t\tfinishBlock(block);\n\t\t\t}\n\t\t\tif (options?.signal?.aborted) {\n\t\t\t\tthrow new Error(\"Request was aborted\");\n\t\t\t}\n\n\t\t\tif (output.stopReason === \"aborted\") {\n\t\t\t\tthrow new Error(\"Request was aborted\");\n\t\t\t}\n\t\t\tif (!hasFinishReason && !compat.supportsFinishReason) {\n\t\t\t\toutput.stopReason = output.content.some((block) => block.type === \"toolCall\") ? \"toolUse\" : \"stop\";\n\t\t\t}\n\t\t\tif (output.stopReason === \"error\") {\n\t\t\t\tthrow new Error(output.errorMessage || \"Provider returned an error stop reason\");\n\t\t\t}\n\t\t\tif ((compat.supportsFinishReason && !hasFinishReason) || output.stopReason === \"pending\") {\n\t\t\t\tthrow new Error(\"Stream ended without finish_reason\");\n\t\t\t}\n\n\t\t\tstream.push({ type: \"done\", reason: output.stopReason, message: output });\n\t\t\tstream.end();\n\t\t} catch (error) {","sourceCodeStart":621,"sourceCodeEnd":657,"githubUrl":"https://github.com/earendil-works/pi/blob/4af9d21d3b4d664e4a29fcabfec85171077248e3/packages/ai/src/api/openai-completions.ts#L621-L657","documentation":"Error \"Request was aborted\" thrown in earendil-works/pi.","triggerScenarios":"Thrown at packages/ai/src/api/openai-completions.ts:639 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Retry the request; ensure the abort signal is not triggered early."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"4af9d21d3b4d664e4a29fcabfec85171077248e3","analyzedAt":"2026-08-24T13:07:14.692Z","schemaVersion":2},"datasetVersion":"2026-08-24T17:17:21.512Z"}