abhigyanpatwari/GitNexus · error

runtimeBlocker (local embedding runtime blocker message)

Error message

runtimeBlocker (local embedding runtime blocker message)

What it means

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.

Solutions

  1. Use an HTTP embedding endpoint via GITNEXUS_EMBEDDING_URL + GITNEXUS_EMBEDDING_MODEL instead of the local pipeline.
  2. Switch to Linux or darwin/arm64 where the local runtime is supported.
  3. Check `gitnexus doctor` to see the exact blocker before attempting installation.
Defensive patterns

Strategy: validation

Validate before calling

import { getLocalEmbeddingRuntimeBlocker } from 'gitnexus/src/core/embeddings/runtime-support.js';
const blocker = getLocalEmbeddingRuntimeBlocker();
if (blocker) throw new Error('Local embedding unavailable on this platform: ' + blocker.split('\n')[0]);
const embedder = await initLocalEmbedder();

Try / catch

try {
  embedder = await initLocalEmbedder();
} catch (err) {
  if (isLocalEmbeddingRuntimeBlockerMessage(err.message)) {
    throw new Error('Use HTTP embedding on this platform; local init can never succeed.');
  }
  throw err;
}

Prevention

When it happens

Trigger: Calling initLocalEmbedder() on a platform where getLocalEmbeddingRuntimeBlocker() returns non-null (e.g. darwin/x64), regardless of whether the embedding runtime prefix has been installed.

Common situations: 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.

Understand the failure class

Background: "unsupported platform" / "not supported on this platform" errors: what they mean and how to fix them — this error's family across 47 libraries.

Related errors


AI-assisted analysis of abhigyanpatwari/GitNexus@ac9a4e9abd (2026-09-15). Data as JSON: /api/errors/6c6919d519432f9d. Report an issue: GitHub.

Appendix: source

Thrown at gitnexus/src/core/embeddings/embedding-local-init.ts:60

    case 'dml':
      return 'GPU (DirectML/DirectX12)';
    case 'cuda':
      return 'GPU (CUDA)';
    default:
      return device.toUpperCase();
  }
};

export const getCurrentDevice = (): EmbeddingSidecarDevice | null => currentDevice;

export const initLocalEmbedder = async (
  onProgress?: ModelProgressCallback,
  config: Partial<EmbeddingConfig> = {},
  forceDevice?: EmbeddingSidecarDevice,
): Promise<FeatureExtractionPipeline> => {
  const runtimeBlocker = getLocalEmbeddingRuntimeBlocker();
  if (runtimeBlocker) {
    throw new Error(runtimeBlocker);
  }

  if (embedderInstance) {
    return embedderInstance;
  }

  if (initPromise) {
    return initPromise;
  }

  const finalConfig = resolveEmbeddingConfig(config);
  const gpuDevice: EmbeddingSidecarDevice = isEffectiveCudaAvailable()
    ? 'cuda'
    : process.platform === 'win32'
      ? 'dml'
      : 'cpu';
  const requestedDevice =
    forceDevice || (finalConfig.device === 'auto' ? gpuDevice : finalConfig.device);

View on GitHub (pinned to ac9a4e9abd)