{"record":{"id":"90f8b73f6ccfe648","repo":"diegosouzapw/OmniRoute","slug":"config-signal-aborted-vision-model-call-aborte","errorCode":null,"errorMessage":"config.signal?.aborted ? \"Vision model call aborted\" : \"Vision model call timed out\"","messagePattern":"config\\.signal\\?\\.aborted \\? \"Vision model call aborted\" : \"Vision model call timed out\"","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/lib/guardrails/visionBridgeHelpers.ts","lineNumber":878,"sourceCode":"      const textContent = anthropicData.content?.find((c) => c.type === \"text\");\n      const content = textContent?.text;\n      if (!content || typeof content !== \"string\") {\n        throw new Error(\"Vision API returned empty or invalid response\");\n      }\n\n      return content.trim();\n    } else {\n      // OpenAI-compatible response format. Falls back to reasoning_content when\n      // content is null — reasoning models (e.g. xiaomi/mimo-v2.5) can exhaust\n      // max_tokens on chain-of-thought and return content: null with the full\n      // analysis in reasoning_content.\n      return extractOpenAICompatibleContent(data);\n    }\n  } catch (error) {\n    clearTimeout(timeoutId);\n\n    if (error instanceof Error && error.name === \"AbortError\") {\n      throw new Error(\n        config.signal?.aborted ? \"Vision model call aborted\" : \"Vision model call timed out\"\n      );\n    }\n\n    throw error;\n  }\n}\n\nexport interface RequestBody {\n  model?: string;\n  messages?: RequestMessage[];\n  input?: RequestMessage[];\n  [key: string]: unknown;\n}\n\n/**\n * Replace image content parts with text descriptions.\n * Concatenates descriptions with labels: \"[Image 1]: ...\"","sourceCodeStart":860,"sourceCodeEnd":896,"githubUrl":"https://github.com/diegosouzapw/OmniRoute/blob/a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d/src/lib/guardrails/visionBridgeHelpers.ts#L860-L896","documentation":"Error \"config.signal?.aborted ? \"Vision model call aborted\" : \"Vision model call timed out\"\" thrown in diegosouzapw/OmniRoute.","triggerScenarios":"Thrown at src/lib/guardrails/visionBridgeHelpers.ts:878 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d","analyzedAt":"2026-08-25T18:35:09.898Z","schemaVersion":2},"datasetVersion":"2026-08-25T21:54:21.419Z"}