OpenHands
OpenHands copied to clipboard
Add HTTP FileStore implementation
- [ ] This change is worth documenting at https://docs.all-hands.dev/
- [x] Include this change in the Release Notes. If checked, you must provide an end-user friendly description for your change below
End-user friendly description of the problem this fixes or functionality this introduces.
This PR adds a new HTTP-based FileStore implementation that allows OpenHands to store and retrieve files using a remote HTTP server. This enables more flexible storage options beyond local files, in-memory storage, and S3.
Summarize what the PR does, explaining any non-trivial design decisions.
This PR adds:
- A new HTTPFileStore class in openhands/storage/http.py that implements the FileStore interface using HTTP requests
- Unit tests for the HTTPFileStore class
The implementation supports:
- Simple session api key authentication out of the box
- Custom headers using a custom httpx client.
- Error handling with appropriate exceptions
Link of any specific issues this addresses:
N/A
To run this PR locally, use the following command:
docker run -it --rm -p 3000:3000 -v /var/run/docker.sock:/var/run/docker.sock --add-host host.docker.internal:host-gateway -e SANDBOX_RUNTIME_CONTAINER_IMAGE=docker.all-hands.dev/all-hands-ai/runtime:107625e-nikolaik --name openhands-app-107625e docker.all-hands.dev/all-hands-ai/openhands:107625e