feat: return FileItem from files.upload() (#118)#119
Merged
adubovik merged 1 commit intoJul 8, 2026
Merged
Conversation
kryachkow
force-pushed
the
118-upload-filemetadata-fileitem-migration
branch
from
July 8, 2026 13:10
443c7a5 to
1cee098
Compare
The upload response is item-shaped, not a folder listing, so upload() now returns FileItem instead of FileMetadata. Introduce a shared ResourceItemMetadata base (created_at, updated_at, etag, author) that mirrors ai-dial-core's hierarchy: FileItem extends it and adds content_length/content_type, while FileMetadata stays a separate folder-listing branch off BaseMetadata.
kryachkow
force-pushed
the
118-upload-filemetadata-fileitem-migration
branch
from
July 8, 2026 13:12
1cee098 to
e9de9f2
Compare
adubovik
approved these changes
Jul 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Applicable issues
Fixes #118
Description of changes
files.upload()was typed to returnFileMetadata— the folder-listing shape carryingitems/next_tokenthat are always empty on an upload response — while the server actually returns an item-shaped object.Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.