Skip to content

Files counted as added without verifying they linked, causing re-upload and re-embed every cycle #115

Description

@ArthurVardevanyan

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions