ruvnet/ruflo · error
[embeddings] agentic-flow installed but does not expose down
Error message
[embeddings] agentic-flow installed but does not expose downloadModel — falling back to lazy fetch via @xenova/transformers on first generate.
What it means
Log warning in downloadEmbeddingModel: agentic-flow is importable but its 2.x line does not export downloadModel, so the model cannot be pre-downloaded through it; the fallback defers to lazy fetching via @xenova/transformers on first generate.
Source
Thrown at v3/@claude-flow/embeddings/src/neural-integration.ts:311
* lazily on first `embeddings_generate` call via @xenova/transformers.
*/
export async function downloadEmbeddingModel(
modelId: string,
targetDir?: string,
onProgress?: (progress: { percent: number; bytesDownloaded: number; totalBytes: number }) => void
): Promise<string> {
try {
const mod = await import('agentic-flow/embeddings').catch((err) => {
throw err;
});
const downloadFn = (mod as Record<string, unknown>).downloadModel;
if (typeof downloadFn !== 'function') {
// agentic-flow is installed but has no downloadModel export (the
// 2.x line shipped clearEmbeddingCache/computeEmbedding* but not
// downloadModel; the function lives on a different path or version).
// Treat as lazy-fetch path — @xenova/transformers will download on
// first generate(). #1700 item 2 follow-up.
console.warn('[embeddings] agentic-flow installed but does not expose downloadModel — ' +
'falling back to lazy fetch via @xenova/transformers on first generate.');
return targetDir ?? '.models';
}
return await (downloadFn as (id: string, dir: string, cb?: typeof onProgress) => Promise<string>)(
modelId, targetDir ?? '.models', onProgress
);
} catch (err) {
const msg = err instanceof Error ? err.message : String(err);
// Distinguish "package missing" / "subpath unsupported" from real
// download errors so callers can surface the right hint to users.
// #1468: Windows + Node strict-ESM raises
// `Package subpath './embeddings' is not defined by "exports"`
// when the bundled agentic-flow's package.json doesn't declare the
// ./embeddings entry. WSL/Linux is more permissive on the same code,
// so the bug only surfaces on Windows. Treat both shapes as
// "agentic-flow neural extras unavailable, fall back to lazy fetch".
if (
/Cannot find package 'agentic-flow'|Cannot find module/.test(msg)View on GitHub (pinned to fa13ee4ad6)
Solutions
- No action needed; models are fetched lazily on first generate. To eager-download, upgrade agentic-flow to a version exposing downloadModel.
Defensive patterns
Strategy: fallback
When it happens
Trigger: Thrown at v3/@claude-flow/embeddings/src/neural-integration.ts:311 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of ruvnet/ruflo@fa13ee4ad6 (2026-08-18).
Data as JSON: /api/errors/b092f8bf15c4bf1c.
Report an issue: GitHub.