janhq/jan · error · Error
Vector DB extension not available
Error message
Vector DB extension not available
What it means
Thrown by RAGExtension.ingestAttachments() (thread-level ingestion) when the resolved VectorDB extension is missing OR lacks createCollection/insertChunks. This is a different capability check than project-level: it requires the foundational vector-db methods. Without them, no thread collection can be created or populated, so the call aborts before the file loop.
Source
Thrown at extensions/rag-extension/src/index.ts:445
): Promise<{
filesProcessed: number
chunksInserted: number
files: AttachmentFileInfo[]
}> {
if (!threadId || !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?.createCollection || !vec?.insertChunks) {
throw new Error('Vector DB extension not available')
}
// 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
- Enable and load vector-db-extension (verify via window.core.extensionManager.get(ExtensionTypeEnum.VectorDB)).
- Reinstall/update vector-db-extension so createCollection and insertChunks are present.
- Check the extension's startup log for a native-binding load failure.
- Guard the caller: skip RAG ingestion and degrade to plain LLM context when the extension is unavailable.
Example fix
// before
await rag.ingestAttachments(threadId, files)
// after
const vec = window.core?.extensionManager.get(ExtensionTypeEnum.VectorDB) as any
if (!vec?.createCollection || !vec?.insertChunks) {
logger.warn('Vector DB unavailable; attachments will not be indexed')
return { filesProcessed: 0, chunksInserted: 0, files: [] }
}
await rag.ingestAttachments(threadId, files) Defensive patterns
Strategy: type-guard
Validate before calling
const vec = window.core?.extensionManager.get(ExtensionTypeEnum.VectorDB) as any
const ok = vec && typeof vec.createCollection === 'function' && typeof vec.insertChunks === 'function'
if (!ok) {
// degrade RAG or prompt to enable/update the extension
} Type guard
function hasCoreVectorDB(vec: unknown): vec is { createCollection: Function; insertChunks: Function } {
const v = vec as any
return !!v && typeof v.createCollection === 'function' && typeof v.insertChunks === 'function'
} Prevention
- Ensure vector-db-extension is enabled whenever rag-extension is enabled.
- Verify extension registration at startup.
- Gracefully disable RAG UI when the vector DB is unavailable.
When it happens
Trigger: Calling ingestAttachments(threadId, files) when vector-db-extension is not registered, crashed, or is a stripped-down build missing createCollection/insertChunks; ExtensionTypeEnum.VectorDB resolves to a different extension than expected.
Common situations: vector-db-extension disabled while rag-extension is enabled; extension failed to load due to a missing native dependency (e.g. sqlite-vec); partial upgrade left an incompatible extension installed.
Related errors
- Vector DB extension does not support project-level ingestion
- llamacpp extension not available
- llamacpp extension not available
- File '${file.name}' has already been attached to this thread
- RAG extension not available
AI-assisted analysis of janhq/jan@fad3f12a14 (2026-08-12).
Data as JSON: /api/errors/9f947a6436d2a2d8.
Report an issue: GitHub.