{"record":{"id":"83be50740b8a9769","repo":"abhigyanpatwari/GitNexus","slug":"runtimeblocker-local-embedding-runtime-blocker-message","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/embedder.ts","lineNumber":51,"sourceCode":"  if (isHttpMode()) return null;\n  return getSidecarDevice();\n};\n\nexport const initEmbedder = async (\n  onProgress?: ModelProgressCallback,\n  config: Partial<EmbeddingConfig> = {},\n  forceDevice?: EmbeddingSidecarDevice,\n): Promise<{ device: EmbeddingSidecarDevice }> => {\n  if (isHttpMode()) {\n    throw new Error(\n      'initEmbedder() should not be called in HTTP mode. ' +\n        'Use embedText()/embedBatch() which handle HTTP transparently.',\n    );\n  }\n\n  const runtimeBlocker = getLocalEmbeddingRuntimeBlocker();\n  if (runtimeBlocker) {\n    throw new Error(runtimeBlocker);\n  }\n\n  return ensureEmbeddingSidecar({\n    onProgress,\n    embeddingConfig: config,\n    forceDevice,\n  });\n};\n\nexport const getEmbedder = (): never => {\n  if (isHttpMode()) {\n    throw new Error(\n      'getEmbedder() is not available in HTTP embedding mode. Use embedText()/embedBatch() instead.',\n    );\n  }\n  throw new Error(\n    'getEmbedder() is not available. Local inference runs in the embedding sidecar. Use embedText()/embedBatch() instead.',\n  );","sourceCodeStart":33,"sourceCodeEnd":69,"githubUrl":"https://github.com/abhigyanpatwari/GitNexus/blob/ac9a4e9abd8fd3058c070b72c23402a4f887929a/gitnexus/src/core/embeddings/embedder.ts#L33-L69","documentation":"initEmbedder throws the message produced by getLocalEmbeddingRuntimeBlocker() when local embedding is fundamentally unsupported on the current platform. The best-known case is macOS Intel (darwin/x64), where onnxruntime-node is unavailable so no local ONNX runtime can run. The message enumerates alternatives: skip --embeddings, use an HTTP embedding endpoint, or move to Linux/Apple Silicon.","triggerScenarios":"Calling initEmbedder() (or any code path that initializes the local embedder, e.g. `gitnexus analyze --embeddings`) on a platform where getLocalEmbeddingRuntimeBlocker() returns a blocker string — notably darwin/x64, where even GITNEXUS_EMBEDDING_DEVICE=wasm|cpu cannot help.","commonSituations":"Developers on Intel Macs running `analyze --embeddings`; official GitNexus Docker images that no longer ship onnxruntime-node; CI runners on unsupported platform/arch combos.","solutions":["Run analyze without --embeddings (all other indexing still works).","Set GITNEXUS_EMBEDDING_URL (plus GITNEXUS_EMBEDDING_MODEL) to an OpenAI-compatible /v1/embeddings endpoint and embed over HTTP.","Run on Linux or Apple Silicon (darwin/arm64) and run `gitnexus embeddings install`.","For Docker, bind-mount a runtime prefix or use the HTTP embedding mode."],"exampleFix":"// before: blocked locally on macOS Intel\nnpx gitnexus analyze --embeddings\n// after: embed via a remote OpenAI-compatible endpoint\nGITNEXUS_EMBEDDING_URL=https://api.openai.com/v1 \\\nGITNEXUS_EMBEDDING_MODEL=text-embedding-3-small \\\nnpx gitnexus analyze --embeddings","handlingStrategy":"fallback","validationCode":"import { getLocalEmbeddingRuntimeBlocker } from 'gitnexus/src/core/embeddings/runtime-support.js';\nconst blocker = getLocalEmbeddingRuntimeBlocker();\nif (blocker) console.warn('local embeddings unavailable:', blocker.split('\\n')[0]);","typeGuard":null,"tryCatchPattern":"try {\n  await initEmbedder();\n} catch (err) {\n  if (isLocalEmbeddingRuntimeBlockerMessage(err.message)) {\n    // switch to HTTP embedding endpoint\n  }\n}","preventionTips":["Check platform support (Linux or darwin/arm64) before enabling --embeddings","Run `gitnexus doctor` to detect the blocker early","In Docker, prefer HTTP embedding mode since official images omit onnxruntime-node"],"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"}