Issue
oikb uploads files to Open WebUI with fire-and-forget semantics — it POSTs to /files/ and treats the HTTP 200 response as success, even though the actual KB linkage (chunking + embedding) happens in the background and can fail silently.
Symptom
Files are reported as added every sync cycle, even though they never land in the KB. This causes:
- The same files to be re-uploaded and re-embedded every hour
SyncResult reports N added when zero files were actually added
- Orphaned
file rows, orphaned vector collections, and wasted embedding cost
Root cause
OikbClient.upload_file does not pass process_in_background=false. Open WebUI returns 200 OK immediately, then the background task fails (e.g. 400: Duplicate content detected). Since oikb never verifies whether the file actually linked, it counts the upload as success and the next sync sees the file is still missing → adds it again.
Issue
oikb uploads files to Open WebUI with fire-and-forget semantics — it POSTs to
/files/and treats the HTTP 200 response as success, even though the actual KB linkage (chunking + embedding) happens in the background and can fail silently.Symptom
Files are reported as
addedevery sync cycle, even though they never land in the KB. This causes:SyncResultreportsN addedwhen zero files were actually addedfilerows, orphaned vector collections, and wasted embedding costRoot cause
OikbClient.upload_filedoes not passprocess_in_background=false. Open WebUI returns 200 OK immediately, then the background task fails (e.g.400: Duplicate content detected). Since oikb never verifies whether the file actually linked, it counts the upload as success and the next sync sees the file is still missing → adds it again.