Skip to content

refactor(llmagent)!: require a positive model call limit - #29

Merged
ktsoator merged 1 commit into
mainfrom
refactor/explicit-model-call-limit
Sep 25, 2026
Merged

ktsoator merged 1 commit into
mainfrom
refactor/explicit-model-call-limit

Conversation

@uterflec

Copy link
Copy Markdown
Collaborator

Omitting MaxModelCalls previously selected an implicit limit of 10. Require an explicit positive limit and reject zero or negative values in llmagent.New.

Update the assistant example and tests to supply explicit limits, and cover zero rejection and the existing call-limit behavior. This is a breaking configuration change: callers that relied on the default must set MaxModelCalls to a positive value (10 preserves the previous behavior).

Validation: go vet and all tests passed with the race detector.

Remove the implicit ten-call default and reject MaxModelCalls values less
than or equal to zero. Update callers and tests to configure explicit
positive limits.

BREAKING CHANGE: llmagent.New now rejects omitted or zero MaxModelCalls.
Callers must set a positive limit; use 10 to preserve the previous default.
@uterflec uterflec added refactor Internal design and implementation improvements breaking-change Public API changes requiring updates in calling code area:agent Agent interfaces, invocation context, and agent implementations labels Sep 24, 2026
@ktsoator
ktsoator requested a review from a team September 24, 2026 09:40
@ktsoator
ktsoator merged commit 1cab6f0 into main Sep 25, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:agent Agent interfaces, invocation context, and agent implementations breaking-change Public API changes requiring updates in calling code refactor Internal design and implementation improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants