{"record":{"id":"4a5046653d85552d","repo":"ruvnet/ruflo","slug":"embeddings-auto-install-failed","errorCode":null,"errorMessage":"[embeddings] Auto-install failed:","messagePattern":"\\[embeddings\\] Auto-install failed:","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"v3/@claude-flow/embeddings/src/embedding-service.ts","lineNumber":870,"sourceCode":"  const execAsync = promisify(exec);\n\n  try {\n    // Check if already available\n    if (await isAgenticFlowAvailable()) {\n      return true;\n    }\n\n    console.log('[embeddings] Installing agentic-flow@alpha...');\n    await execAsync('npm install agentic-flow@alpha --save', { timeout: 120000 });\n\n    // Initialize the model\n    console.log('[embeddings] Downloading embedding model...');\n    await execAsync('npx agentic-flow@alpha embeddings init', { timeout: 300000 });\n\n    // Verify installation\n    return await isAgenticFlowAvailable();\n  } catch (error) {\n    console.warn('[embeddings] Auto-install failed:', error instanceof Error ? error.message : error);\n    return false;\n  }\n}\n\n/**\n * Create embedding service based on configuration (sync version)\n * Note: For 'auto' provider or smart fallback, use createEmbeddingServiceAsync\n */\nexport function createEmbeddingService(config: EmbeddingConfig): IEmbeddingService {\n  switch (config.provider) {\n    case 'openai':\n      return new OpenAIEmbeddingService(config as OpenAIEmbeddingConfig);\n    case 'transformers':\n      return new TransformersEmbeddingService(config as TransformersEmbeddingConfig);\n    case 'mock':\n      return new MockEmbeddingService(config as MockEmbeddingConfig);\n    case 'agentic-flow':\n      return new AgenticFlowEmbeddingService(config as AgenticFlowEmbeddingConfig);","sourceCodeStart":852,"sourceCodeEnd":888,"githubUrl":"https://github.com/ruvnet/ruflo/blob/fa13ee4ad60ac2090b1480656eb233521790d640/v3/@claude-flow/embeddings/src/embedding-service.ts#L852-L888","documentation":"Log warning in the auto-install helper: the npm install of agentic-flow@alpha or the subsequent model initialization command failed, so automatic provisioning of the embedding backend is abandoned and the caller must handle the package being unavailable.","triggerScenarios":"Thrown at v3/@claude-flow/embeddings/src/embedding-service.ts:870 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Install the embeddings dependency manually (npm install agentic-flow or @xenova/transformers) since auto-install failed; check npm permissions and network access."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"fa13ee4ad60ac2090b1480656eb233521790d640","analyzedAt":"2026-08-18T21:34:22.708Z","contentChangedAt":"2026-08-18T21:34:22.708Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}