You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix PresignedUrlResponse model to match API response format (#125)
# Fix PresignedUrlResponse model to match API response format
## Summary
Fixes a Pydantic validation error when uploading videos using the vlmrun
Python client (v0.3.4). The issue was that the `PresignedUrlResponse`
model expected `method` and `expiration` fields, but the actual API
response returns `upload_method` and `public_url` instead.
**Changes:**
- Added `upload_method` and `public_url` fields that the API actually
returns
- Made `method` and `expiration` optional with default `None` since the
API doesn't return them
- Preserved all existing fields used by the upload logic (`id`, `url`,
`filename`, `content_type`, `created_at`)
## Review & Testing Checklist for Human
- [ ] **Test video upload end-to-end** - Verify that uploading videos
with presigned URLs now works without Pydantic validation errors
- [ ] **Check for field dependencies** - Search codebase to ensure no
other code relies on `method` or `expiration` fields being non-None
- [ ] **Verify API response format** - Confirm the actual API response
matches the updated model by testing or reviewing API documentation
### Notes
- Tests pass (129 passed, 1 unrelated OpenAI test failure)
- Lint checks pass
- The upload logic in `files.py` only uses `response.id`,
`response.url`, and `response.content_type` which are all preserved
- Based on user report and direct API call showing actual response
format
**Link to Devin run:**
https://app.devin.ai/sessions/8667ea8d7aab4329875df4db35d2e299
**Requested by:** [email protected]
---------
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: [email protected] <[email protected]>
Co-authored-by: dineshreddy <[email protected]>
0 commit comments