{"record":{"id":"6c6919d519432f9d","repo":"abhigyanpatwari/GitNexus","slug":"runtimeblocker-local-embedding-runtime-blocker-message-init","errorCode":null,"errorMessage":"runtimeBlocker (local embedding runtime blocker message)","messagePattern":"runtimeBlocker \\(local embedding runtime blocker message\\)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"gitnexus/src/core/embeddings/embedding-local-init.ts","lineNumber":60,"sourceCode":"    case 'dml':\n      return 'GPU (DirectML/DirectX12)';\n    case 'cuda':\n      return 'GPU (CUDA)';\n    default:\n      return device.toUpperCase();\n  }\n};\n\nexport const getCurrentDevice = (): EmbeddingSidecarDevice | null => currentDevice;\n\nexport const initLocalEmbedder = async (\n  onProgress?: ModelProgressCallback,\n  config: Partial<EmbeddingConfig> = {},\n  forceDevice?: EmbeddingSidecarDevice,\n): Promise<FeatureExtractionPipeline> => {\n  const runtimeBlocker = getLocalEmbeddingRuntimeBlocker();\n  if (runtimeBlocker) {\n    throw new Error(runtimeBlocker);\n  }\n\n  if (embedderInstance) {\n    return embedderInstance;\n  }\n\n  if (initPromise) {\n    return initPromise;\n  }\n\n  const finalConfig = resolveEmbeddingConfig(config);\n  const gpuDevice: EmbeddingSidecarDevice = isEffectiveCudaAvailable()\n    ? 'cuda'\n    : process.platform === 'win32'\n      ? 'dml'\n      : 'cpu';\n  const requestedDevice =\n    forceDevice || (finalConfig.device === 'auto' ? gpuDevice : finalConfig.device);","sourceCodeStart":42,"sourceCodeEnd":78,"githubUrl":"https://github.com/abhigyanpatwari/GitNexus/blob/ac9a4e9abd8fd3058c070b72c23402a4f887929a/gitnexus/src/core/embeddings/embedding-local-init.ts#L42-L78","documentation":"initLocalEmbedder throws the getLocalEmbeddingRuntimeBlocker() message as its very first check, before any pipeline loading, when the local embedding runtime is impossible on this platform. Unlike the 'needs install' case, no amount of installation helps here — the platform itself (e.g. macOS Intel) is unsupported for onnxruntime-node.","triggerScenarios":"Calling initLocalEmbedder() on a platform where getLocalEmbeddingRuntimeBlocker() returns non-null (e.g. darwin/x64), regardless of whether the embedding runtime prefix has been installed.","commonSituations":"Direct programmatic use of the local embedder on Intel Macs; tools invoking initLocalEmbedder instead of the pipeline which would have surfaced the blocker earlier with CLI-friendly formatting.","solutions":["Use an HTTP embedding endpoint via GITNEXUS_EMBEDDING_URL + GITNEXUS_EMBEDDING_MODEL instead of the local pipeline.","Switch to Linux or darwin/arm64 where the local runtime is supported.","Check `gitnexus doctor` to see the exact blocker before attempting installation."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"import { getLocalEmbeddingRuntimeBlocker } from 'gitnexus/src/core/embeddings/runtime-support.js';\nconst blocker = getLocalEmbeddingRuntimeBlocker();\nif (blocker) throw new Error('Local embedding unavailable on this platform: ' + blocker.split('\\n')[0]);\nconst embedder = await initLocalEmbedder();","typeGuard":null,"tryCatchPattern":"try {\n  embedder = await initLocalEmbedder();\n} catch (err) {\n  if (isLocalEmbeddingRuntimeBlockerMessage(err.message)) {\n    throw new Error('Use HTTP embedding on this platform; local init can never succeed.');\n  }\n  throw err;\n}","preventionTips":["Verify platform/arch support before attempting local init — no install fixes a blocker","Call getLocalEmbeddingRuntimeBlocker() before init to fail fast with your own message","On darwin/x64, skip local embedding paths entirely"],"tags":["embedding","platform","unsupported-platform","onnx"],"backgroundTag":"unsupported-platform","analyzedSha":"ac9a4e9abd8fd3058c070b72c23402a4f887929a","analyzedAt":"2026-09-15T23:29:44.066Z","contentChangedAt":"2026-09-15T23:29:44.066Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}