{"record":{"id":"1c03e2e6205a98fc","repo":"diegosouzapw/OmniRoute","slug":"vision-model-call-aborted","errorCode":null,"errorMessage":"Vision model call aborted","messagePattern":"Vision model call aborted","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/lib/guardrails/visionBridgeHelpers.ts","lineNumber":385,"sourceCode":"  if (!taskAware || !text) return basePrompt;\n  const hint = text.length > 500 ? `${text.slice(0, 500)}…` : text;\n  return `${basePrompt}\\n\\nThe user asked: \"${hint}\". Focus your description on what is relevant to answering this, and transcribe any text visible in the image.`;\n}\n\n/**\n * Call the vision model to get an image description.\n * Supports both OpenAI-compatible and Anthropic API formats.\n * Uses auto-routing to select the fastest available model.\n */\nexport async function callVisionModel(\n  imageDataUri: string,\n  config: VisionModelConfig,\n  apiKey?: string,\n  routerConfig?: Partial<import(\"./visionBridgeRouter\").VisionBridgeRouterConfig>,\n  deps?: import(\"./visionBridgeRouter\").VisionBridgeRouterDeps\n): Promise<string> {\n  if (config.signal?.aborted) {\n    throw new Error(\"Vision model call aborted\");\n  }\n\n  // Auto-select the best vision model. `deps` is the router's existing\n  // injectable credential-check seam — without forwarding it, tests (and any\n  // embedder) cannot keep model selection away from the live connections DB.\n  const modelToUse = await getBestVisionModel(\n    {\n      fixedModel: config.model,\n      ...routerConfig,\n    },\n    deps\n  );\n  // (#8430) When no vision-capable provider has usable credentials on this\n  // instance, surface a clear error instead of attempting a describe call that\n  // would fail with an opaque auth/serde error upstream.\n  if (!modelToUse) {\n    throw new Error(\"No vision-capable provider connected, cannot process image request\");\n  }","sourceCodeStart":367,"sourceCodeEnd":403,"githubUrl":"https://github.com/diegosouzapw/OmniRoute/blob/a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d/src/lib/guardrails/visionBridgeHelpers.ts#L367-L403","documentation":"Error \"Vision model call aborted\" thrown in diegosouzapw/OmniRoute.","triggerScenarios":"Thrown at src/lib/guardrails/visionBridgeHelpers.ts:385 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"}