-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Adding run_id to ModelRequest and ModelResponse #3366
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
adtyavrdhn
wants to merge
19
commits into
pydantic:main
Choose a base branch
from
adtyavrdhn:adding_run_id_to_modelmessage
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
b5b8b89
Adding run_id to ModelRequest and ModelResponse, propagating it via G…
adtyavrdhn 6234705
Fixing test_agent
adtyavrdhn 5a2fcea
Fixing tests
adtyavrdhn 4325747
Fixing tests
adtyavrdhn 558d12c
Adding run_id to abstract and agent_graph for tool_calls
adtyavrdhn 28976af
Adding run_id to stream responses
adtyavrdhn 5d426fa
Fixing model tests with run_id
adtyavrdhn 2424017
Adding fix for tests, run_id added
adtyavrdhn a7dd57a
Merge branch 'main' of https://github.com/pydantic/pydantic-ai into a…
adtyavrdhn b236a47
Fixing doc tests
adtyavrdhn 6c45e1f
Temporal fix
adtyavrdhn e4ae362
ut doc fix
adtyavrdhn 3867b8c
commas? for snapshots
adtyavrdhn a7094a1
lint
adtyavrdhn 6625f7f
fix google test
adtyavrdhn 90db5ac
spelling
adtyavrdhn 2b71cb3
fixing dbos test
adtyavrdhn cc58097
fixing outline tests
adtyavrdhn 08cefe4
We should not reach that part when _stream_response is none, can have…
adtyavrdhn File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We may also need to do this in
StreamedRunResult._marked_completedto get this to work right when usingagent.run_stream:pydantic-ai/pydantic_ai_slim/pydantic_ai/result.py
Lines 555 to 556 in 4cc4f35
You'll want to test if it currently works, and if not add it.
We also definitely need to set the
run_idhere:pydantic-ai/pydantic_ai_slim/pydantic_ai/agent/abstract.py
Lines 560 to 562 in 4cc4f35
pydantic-ai/pydantic_ai_slim/pydantic_ai/_agent_graph.py
Lines 742 to 744 in 4cc4f35
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I made it a part of RunContext and passed it, added for the others two as well