Feat: optionally add uploaded file metadata to session_state when media is not sent to model#7316
Open
harsh21234i wants to merge 1 commit intoagno-agi:mainfrom
Open
Feat: optionally add uploaded file metadata to session_state when media is not sent to model#7316harsh21234i wants to merge 1 commit intoagno-agi:mainfrom
harsh21234i wants to merge 1 commit intoagno-agi:mainfrom
Conversation
…media is not sent to model
Contributor
PR TriageMissing tests: This PR modifies source code but does not include any test changes. Please add or update tests to cover your changes. |
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.
Fixes #7306 Adds an opt-in feature to include uploaded file metadata (file_id and filename) in session_state when send_media_to_model=False.
Currently, when media is not sent to the model, the agent has no awareness that files were provided during a run, even though they may still be available for tool usage. This change makes file metadata accessible through session_state without requiring additional user input or custom hooks.
Changes
Introduced optional flag add_file_ids_to_session_state
When enabled and send_media_to_model=False, file metadata is extracted and stored in run_context.session_state
Supports multiple files
Appends to existing session state instead of overwriting