janhq/jan · error · Error

Vector DB extension does not support project-level ingestion

Error message

Vector DB extension does not support project-level ingestion

What it means

Thrown by RAGExtension.ingestAttachmentsForProject() when the resolved VectorDB extension is absent OR lacks an ingestFileForProject method. Project-level ingestion was added later than thread-level, so an older/incompatible vector-db-extension exposes createCollection/insertChunks but not ingestFileForProject. The guard prevents calling an undefined method.

Source

Thrown at extensions/rag-extension/src/index.ts:387

  ): Promise<{
    filesProcessed: number
    chunksInserted: number
    files: AttachmentFileInfo[]
  }> {
    if (!projectId || !Array.isArray(files) || files.length === 0) {
      return { filesProcessed: 0, chunksInserted: 0, files: [] }
    }

    // Respect feature flag: do nothing when disabled
    if (this.config.enabled === false) {
      return { filesProcessed: 0, chunksInserted: 0, files: [] }
    }

    const vec = window.core?.extensionManager.get(
      ExtensionTypeEnum.VectorDB
    ) as unknown as VectorDBExtension
    if (!vec?.ingestFileForProject) {
      throw new Error('Vector DB extension does not support project-level ingestion')
    }

    // Load settings
    const s = this.config
    const maxSize = (s?.enabled === false ? 0 : s?.maxFileSizeMB) || undefined
    const chunkSize = s?.chunkSizeChars as number | undefined
    const chunkOverlap = s?.overlapChars as number | undefined

    let totalChunks = 0
    const processedFiles: AttachmentFileInfo[] = []

    for (const f of files) {
      if (!f?.path) continue
      if (maxSize && f.size && f.size > maxSize * 1024 * 1024) {
        throw new Error(
          `File '${f.name}' exceeds size limit (${f.size} bytes > ${maxSize} MB).`
        )
      }

View on GitHub (pinned to fad3f12a14)

Solutions

  1. Update vector-db-extension to a version that implements ingestFileForProject.
  2. Ensure vector-db-extension is enabled and loaded (check window.core.extensionManager.get(ExtensionTypeEnum.VectorDB)).
  3. Guard the call site: fall back to thread-level ingestAttachments if project-level is unavailable.
  4. Restart the app to re-register extensions after enabling vector-db-extension.

Example fix

// before
await rag.ingestAttachmentsForProject(projectId, files)

// after
const vec = window.core?.extensionManager.get(ExtensionTypeEnum.VectorDB)
if (!vec?.ingestFileForProject) {
  // fall back to thread-scoped ingestion or prompt the user to enable/update the extension
  return
}
await rag.ingestAttachmentsForProject(projectId, files)
Defensive patterns

Strategy: type-guard

Validate before calling

const vec = window.core?.extensionManager.get(ExtensionTypeEnum.VectorDB) as any
const supportsProject = typeof vec?.ingestFileForProject === 'function'
if (!supportsProject) {
  // fall back to thread-level ingestion, or prompt to update the extension
}

Type guard

function supportsProjectIngest(vec: unknown): vec is { ingestFileForProject: Function } {
  return !!vec && typeof (vec as any).ingestFileForProject === 'function'
}

Prevention

When it happens

Trigger: Calling ingestAttachmentsForProject(projectId, files) when vector-db-extension is disabled, failed to load, or is a version predating the project-level API; running RAG against a stub/mock VectorDB extension in tests.

Common situations: Mixing extension versions after a partial upgrade; vector-db-extension disabled in settings but rag-extension still enabled; the extension crashed during startup and was not re-registered.

Related errors


AI-assisted analysis of janhq/jan@fad3f12a14 (2026-08-12). Data as JSON: /api/errors/63255176f5dc5dd7. Report an issue: GitHub.