-
Notifications
You must be signed in to change notification settings - Fork 311
feat: make maxOldToolCallTokens configurable in agent YAML #2192
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -77,6 +77,7 @@ func (sm *SessionManager) CreateSession(ctx context.Context, sessionTemplate *se | |
| opts = append(opts, | ||
| session.WithMaxIterations(sessionTemplate.MaxIterations), | ||
| session.WithMaxConsecutiveToolCalls(sessionTemplate.MaxConsecutiveToolCalls), | ||
| session.WithMaxOldToolCallTokens(sessionTemplate.MaxOldToolCallTokens), | ||
| session.WithToolsApproved(sessionTemplate.ToolsApproved), | ||
| ) | ||
|
|
||
|
|
@@ -347,6 +348,7 @@ func (sm *SessionManager) runtimeForSession(ctx context.Context, sess *session.S | |
| } | ||
| sess.MaxIterations = agent.MaxIterations() | ||
| sess.MaxConsecutiveToolCalls = agent.MaxConsecutiveToolCalls() | ||
| sess.MaxOldToolCallTokens = agent.MaxOldToolCallTokens() | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The new line Impact: If a session is created with a specific Note: This pattern was already established for Recommendation: Consider whether session-specific settings should persist, or document that sessions always use current agent configuration. |
||
|
|
||
| opts := []runtime.Opt{ | ||
| runtime.WithCurrentAgent(currentAgent), | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
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.
FYI @derekmisler I noticed the WithMaxConsecutiveToolCalls was not propagated properly (had the same issue initially for WithMaxOldToolCallTokens, I added the propagation here. We didn't noticed because we only use the default value I suppose)