WithMaxConsecutiveToolCalls sets the threshold for consecutive identical tool call detection. 0 means "use runtime default of 5". Negative values are ignored.
(n int)
| 775 | // call detection. 0 means "use runtime default of 5". Negative values are |
| 776 | // ignored. |
| 777 | func WithMaxConsecutiveToolCalls(n int) Opt { |
| 778 | return func(s *Session) { |
| 779 | if n >= 0 { |
| 780 | s.MaxConsecutiveToolCalls = n |
| 781 | } |
| 782 | } |
| 783 | } |
| 784 | |
| 785 | // WithMaxOldToolCallTokens sets the maximum token budget for old tool call content. |
| 786 | // Positive values enable truncation; 0 and -1 disable truncation (unlimited tool content). |
no outgoing calls
no test coverage detected