Skip to content

artifact upload filename fix - #2214

Open
deb538 wants to merge 5 commits into
ag-ui-protocol:mainfrom
deb538:fix/artifact-filename
Open

artifact upload filename fix#2214
deb538 wants to merge 5 commits into
ag-ui-protocol:mainfrom
deb538:fix/artifact-filename

Conversation

@deb538

@deb538 deb538 commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Summary
Plumbs the uploaded file's filename through the AG-UI → ADK conversion so it lands on google.genai.types.Blob.display_name. Currently the filename is parsed off the wire into BinaryInputContent.filename and then silently dropped during conversion, so downstream ADK consumers never see it.

Why this is needed
Currently an uploaded report.pdf gets saved on disk as artifact_<invocation_id>_ and the user turn is rewritten to [Uploaded Artifact: "artifact_e-_1"] — an opaque, unbrowseable name with the original filename lost. With this fix the same upload is saved as report.pdf and the placeholder reads [Uploaded Artifact: "report.pdf"].

This matters because ADK's SaveFilesAsArtifactsPlugin (the blessed replacement for the deprecated RunConfig(save_input_blobs_as_artifacts=True) path) uses Blob.display_name to name the persisted artifact

Backward compatibility
Fully backward compatible. filename defaults to None; when absent the constructed Blob is byte-for-byte identical to before (no display_name set). Both BinaryInputContent.filename and Blob.display_name are pre-existing fields — this only adds the missing plumbing between them, it is not an API change.

Testing
Added unit tests asserting display_name is populated when filename is supplied and remains None when it is not.

@deb538
deb538 requested a review from a team as a code owner July 20, 2026 20:54
@deb538

deb538 commented Jul 21, 2026

Copy link
Copy Markdown
Contributor Author

#2213

This is the issue I have created

@deb538 deb538 changed the title artifact filename fix artifact upload filename fix Jul 21, 2026
@deb538

deb538 commented Jul 27, 2026

Copy link
Copy Markdown
Contributor Author

Can anyone please help to review this PR please

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant