-
Notifications
You must be signed in to change notification settings - Fork 3
Description
Description
When I upload multiple files to kubecoderun through Librechat, the files are often not retrievable past the first execution, which causes issues as it can't process the files.
I dug into the logs a bit, these are the findings summarised by claude:
Actual Root Cause: Multi-file uploads create separate sessions
Each file upload creates a separate KubeCodeRun session because entity_id is null:
When the code executes, the orchestrator picks one session to reuse (RAQnp5FoSN4l - "Reusing session from file reference") and only pushes that session's files to the execution pod. The second file (5321947.csv) lives in a completely different session (tglCu-MvWqV5) and never gets pushed.
The first execution succeeded in reading both files (likely because both file IDs were explicitly referenced in the initial exec request and both got pushed). But from the second execution onward, only the "reused session's" files get pushed to each new pool pod — so 5321947.csv is gone.
All subsequent executions ran under RAQnp5FoSN4lCHwU2ddU6 on 8 different pool pods, all failing to find 5321947.csv.
The Possible Fix
Librechat is uploading each file individually with entity_id: null. To fix this, it needs to either:
- Pass an entity_id (e.g., the conversation ID) on each /upload call so both files land in the same session
- Upload both files in a single /upload call (the API supports count > 1)
- Pass all file IDs in the exec request and have KubeCodeRun merge files across sessions (would require an API change)
Is it something I can fix with a config change, or do you think it needs to be fixed in Kubecoderun?
Thanks - it is an amazing product, much better than the old unmaintained official CI.