{"record":{"id":"287b0c5acd69acc0","repo":"diegosouzapw/OmniRoute","slug":"bifrost-sidecar-timed-out-after-config-timeoutms","errorCode":null,"errorMessage":"Bifrost sidecar timed out after ${config.timeoutMs}ms","messagePattern":"Bifrost sidecar timed out after (.+?)ms","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/app/api/v1/relay/chat/completions/route.ts","lineNumber":191,"sourceCode":"    recordUsage(\n      token.id,\n      request,\n      startTime,\n      clientIp,\n      userAgent,\n      // upstream.ok is guaranteed true here (the !upstream.ok branch above returns early).\n      \"success\",\n      upstream.status\n    );\n\n    return new Response(upstream.body, {\n      status: upstream.status,\n      headers,\n    });\n  } catch (error) {\n    clearTimeout(tid);\n    const isAbort = error instanceof Error && error.name === \"AbortError\";\n    throw new Error(\n      isAbort\n        ? `Bifrost sidecar timed out after ${config.timeoutMs}ms`\n        : `Bifrost sidecar unreachable: ${error instanceof Error ? error.message : String(error)}`\n    );\n  }\n}\n\nexport async function OPTIONS() {\n  return handleCorsOptions();\n}\n\nasync function postHandler(request: Request) {\n  const startTime = Date.now();\n  const clientIp = getClientIp(request);\n  const userAgent = sanitizeForensicHeader(request.headers.get(\"user-agent\"));\n\n  try {\n    // 1. Authenticate","sourceCodeStart":173,"sourceCodeEnd":209,"githubUrl":"https://github.com/diegosouzapw/OmniRoute/blob/a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d/src/app/api/v1/relay/chat/completions/route.ts#L173-L209","documentation":"Error \"Bifrost sidecar timed out after ${config.timeoutMs}ms\" thrown in diegosouzapw/OmniRoute.","triggerScenarios":"Thrown at src/app/api/v1/relay/chat/completions/route.ts:191 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"}