Repository navigation
Remove total_steps and token_count from AgentState - #770
Merged
Merged
Conversation
mateusz834
force-pushed
the
dev/MP/limits-as-settings
branch
from
May 8, 2026 10:04
bc3ab13 to
67be015
Compare
mateusz834
force-pushed
the
dev/MP/remove-total_steps
branch
from
May 8, 2026 10:04
8a0d9bd to
26468f3
Compare
mateusz834
force-pushed
the
dev/MP/limits-as-settings
branch
from
May 8, 2026 11:17
67be015 to
8877f69
Compare
mateusz834
force-pushed
the
dev/MP/remove-total_steps
branch
from
May 8, 2026 11:17
26468f3 to
3b63421
Compare
mateusz834
force-pushed
the
dev/MP/limits-as-settings
branch
from
May 8, 2026 11:24
8877f69 to
a2ea91a
Compare
mateusz834
force-pushed
the
dev/MP/remove-total_steps
branch
2 times, most recently
from
May 8, 2026 11:31
d3e0ca5 to
451c178
Compare
total_steps and token_count from AgentState
mateusz834
force-pushed
the
dev/MP/remove-total_steps
branch
from
May 8, 2026 11:45
451c178 to
1feeaf6
Compare
mateusz834
force-pushed
the
dev/MP/limits-as-settings
branch
from
May 8, 2026 11:57
a2ea91a to
c149ff6
Compare
mateusz834
force-pushed
the
dev/MP/remove-total_steps
branch
from
May 8, 2026 11:57
1feeaf6 to
acf8e13
Compare
mateusz834
force-pushed
the
dev/MP/limits-as-settings
branch
from
May 8, 2026 12:18
c149ff6 to
7ca19f6
Compare
mateusz834
force-pushed
the
dev/MP/remove-total_steps
branch
from
May 8, 2026 12:18
acf8e13 to
26fefda
Compare
total_steps and token_count from AgentStatetotal_steps and token_count from AgentState
mateusz834
marked this pull request as ready for review
May 8, 2026 12:21
mateusz834
force-pushed
the
dev/MP/remove-total_steps
branch
from
May 8, 2026 13:17
26fefda to
6b26c3c
Compare
mateusz834
force-pushed
the
dev/MP/limits-as-settings
branch
2 times, most recently
from
May 8, 2026 13:19
03591d5 to
f0ab600
Compare
mateusz834
force-pushed
the
dev/MP/remove-total_steps
branch
2 times, most recently
from
May 8, 2026 14:02
9ae8747 to
ff52383
Compare
mateusz834
force-pushed
the
dev/MP/limits-as-settings
branch
from
May 11, 2026 07:51
f0ab600 to
d1647fd
Compare
mateusz834
force-pushed
the
dev/MP/remove-total_steps
branch
2 times, most recently
from
May 11, 2026 08:25
08a40e1 to
f4e4a52
Compare
mateusz834
force-pushed
the
dev/MP/limits-as-settings
branch
from
May 11, 2026 08:25
d1647fd to
4904ce4
Compare
mateusz834
force-pushed
the
dev/MP/remove-total_steps
branch
2 times, most recently
from
May 11, 2026 10:17
b4cf77d to
ee0855a
Compare
szykol
approved these changes
May 11, 2026
Steps can be inferred from len(messages). Additionally this fixes a bug, where model middleware overrides messages, without updating the total_steps/token_count field. As this is an easy mistake to do, i don't think it is worth exposing such fields.
mateusz834
force-pushed
the
dev/MP/remove-total_steps
branch
from
May 11, 2026 11:44
ee0855a to
0af71db
Compare
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.
Steps can be inferred from
len(messages).Additionally this fixes a bug, where model middleware overrides messages, without updating the
total_steps/token_countfield. As this is an easy mistake to do, i don't think it is worth exposing such fields.This change also makes sure we take into account tool definitions in token use calculations.