{"record":{"id":"0d30806c69d101d7","repo":"janhq/jan","slug":"rag-extension-does-not-support-project-level-inges","errorCode":null,"errorMessage":"RAG extension does not support project-level ingestion","messagePattern":"RAG extension does not support project-level ingestion","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"web-app/src/services/uploads/default.ts","lineNumber":36,"sourceCode":"    if (!ext?.ingestAttachments) throw new Error('RAG extension not available')\n    const res: IngestAttachmentsResult = await ext.ingestAttachments(threadId, [\n      { path: attachment.path!, name: attachment.name, type: attachment.fileType, size: attachment.size },\n    ])\n    const files = res.files\n    if (Array.isArray(files) && files[0]?.id) {\n      return {\n        id: files[0].id,\n        size: typeof files[0].size === 'number' ? Number(files[0].size) : undefined,\n        chunkCount: typeof files[0].chunk_count === 'number' ? Number(files[0].chunk_count) : undefined,\n      }\n    }\n    throw new Error('Failed to resolve ingested attachment id')\n  }\n\n  async ingestFileAttachmentForProject(projectId: string, attachment: Attachment): Promise<UploadResult> {\n    if (attachment.type !== 'document') throw new Error('ingestFileAttachmentForProject: attachment is not document')\n    const ext = ExtensionManager.getInstance().get<RAGExtension>(ExtensionTypeEnum.RAG)\n    if (!ext?.ingestAttachmentsForProject) throw new Error('RAG extension does not support project-level ingestion')\n    const res: IngestAttachmentsResult = await ext.ingestAttachmentsForProject(projectId, [\n      { path: attachment.path!, name: attachment.name, type: attachment.fileType, size: attachment.size },\n    ])\n    const files = res.files\n    if (Array.isArray(files) && files[0]?.id) {\n      return {\n        id: files[0].id,\n        size: typeof files[0].size === 'number' ? Number(files[0].size) : undefined,\n        chunkCount: typeof files[0].chunk_count === 'number' ? Number(files[0].chunk_count) : undefined,\n      }\n    }\n    throw new Error('Failed to resolve ingested attachment id')\n  }\n}\n","sourceCodeStart":18,"sourceCodeEnd":51,"githubUrl":"https://github.com/janhq/jan/blob/fad3f12a147d138388a66f0d92a02b2675f65294/web-app/src/services/uploads/default.ts#L18-L51","documentation":"Thrown by ingestFileAttachmentForProject when the RAG extension is registered but does not implement ingestAttachmentsForProject - an older or stripped-down RAG extension that only supports thread-level ingestion. Project-level ingestion is a newer, separate capability.","triggerScenarios":"ExtensionManager.get<RAGExtension>(ExtensionTypeEnum.RAG) returns an object, but that object has no ingestAttachmentsForProject function - so !ext?.ingestAttachmentsForProject is true.","commonSituations":"Deployed RAG extension predates the project-level ingestion API; feature-gated build that omitted the method; extension partially loaded.","solutions":["Update to / enable a RAG extension version that implements ingestAttachmentsForProject.","Fall back to thread-level ingestion (ingestFileAttachment) if project-level isn't required.","Disable the project document-upload UI when the capability is absent."],"exampleFix":"// before: throw on missing project method\nconst ext = ExtensionManager.getInstance().get<RAGExtension>(ExtensionTypeEnum.RAG)\nif (!ext?.ingestAttachmentsForProject) throw new Error('RAG extension does not support project-level ingestion')\n// after: feature-detect and gate the UI\nconst ext = ExtensionManager.getInstance().get<RAGExtension>(ExtensionTypeEnum.RAG)\nif (!ext?.ingestAttachmentsForProject) { setProjectUploadEnabled(false); return }","handlingStrategy":"validation","validationCode":"function supportsProjectIngest(): boolean {\n  return !!ExtensionManager.getInstance().get<RAGExtension>(ExtensionTypeEnum.RAG)?.ingestAttachmentsForProject\n}","typeGuard":"function hasProjectIngest(e: unknown): e is RAGExtension {\n  return !!e && typeof (e as RAGExtension).ingestAttachmentsForProject === 'function'\n}","tryCatchPattern":null,"preventionTips":["Feature-detect ingestAttachmentsForProject before enabling project-upload UI.","Document the minimum RAG extension version required for project ingestion."],"tags":["rag","uploads","capability","version-mismatch","project"],"backgroundTag":null,"analyzedSha":"fad3f12a147d138388a66f0d92a02b2675f65294","analyzedAt":"2026-08-12T20:33:47.516Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}