Repository navigation
fix(runners): save input blobs as artifacts for LlmAgent roots - #8400
Open
sumedh-aerram wants to merge 1 commit into
Open
sumedh-aerram wants to merge 1 commit into
sumedh-aerram wants to merge 1 commit into
Conversation
Reuse the legacy upload handling in the node runner message path so explicitly enabled saving preserves artifact names, placeholder parts, and service versioning. Fixes google#8399
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.
Please ensure you have read the contribution guide before creating a pull request.
Link to Issue or Description of Change
Fixes #8399
Problem: A direct LlmAgent root ignores an explicitly enabled RunConfig.save_input_blobs_as_artifacts flag. The same upload is saved when the root is a SequentialAgent.
Solution: Reuse the legacy blob-saving helper before appending node-path user messages. Preserve artifact names, placeholder text, and artifact-service versioning.
Testing Plan
Unit Tests:
python -m pytest tests/unittests/test_runners.py tests/unittests/runners tests/unittests/workflow/test_node_runner_utils.py -q: 382 passed, 1 skipped, 3 xfailed.Regression tests against upstream before the fix: 36 cases; upstream: 2 failed and 34 passed. Failures are the direct LlmAgent and Workflow roots with saving enabled, an artifact service, and no plugin.
Direct LlmAgent, Workflow, and SequentialAgent roots; true, false, and unset configuration; artifact service present/absent; SaveFilesAsArtifactsPlugin with and without the flag; two turns, exact saved Parts, names, placeholders, version lists, persisted user input, and model input.
Pre-commit passed on both changed files. Mypy passed on the changed source file with no errors; tests are excluded by the repository mypy configuration.
Manual End-to-End (E2E) Tests:
Run the offline issue reproduction. LlmAgent and SequentialAgent each print
saved artifacts: 1. This was executed with a scripted model or mocked storage client; no live model or GCS service was called.Checklist
Additional context
This restores existing behavior without changing public signatures or schemas. There are no dependent changes. Live service E2E testing was not performed.