Skip to content

Enforce single ToolAdvisor invariant in DefaultChatClient#6111

Closed
tzolov wants to merge 1 commit into
spring-projects:mainfrom
tzolov:tool-advisor-polish
Closed

Enforce single ToolAdvisor invariant in DefaultChatClient#6111
tzolov wants to merge 1 commit into
spring-projects:mainfrom
tzolov:tool-advisor-polish

Conversation

@tzolov
Copy link
Copy Markdown
Contributor

@tzolov tzolov commented May 21, 2026

  • Add validateSingleToolAdvisor() to throw IllegalStateException when more than one ToolAdvisor is present in the advisor chain after auto-registration.
  • Delegate legacy toolCallbacks/toolContext methods to tools(ToolSpec) to consolidate validation.
  • Remove the streaming boolean from buildAdvisorChain since streamToolCallResponses is now pre-configured on the builder.

- Add validateSingleToolAdvisor() to throw IllegalStateException when more
  than one ToolAdvisor is present in the advisor chain after auto-registration.
- Delegate legacy toolCallbacks/toolContext methods to tools(ToolSpec) to
  consolidate validation.
- Remove the streaming boolean from buildAdvisorChain
  since streamToolCallResponses is now pre-configured on the builder.

Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com>
@tzolov tzolov added this to the 2.0.0-M7 milestone May 21, 2026
@tzolov tzolov added bug Something isn't working tool calling advisors labels May 21, 2026
@sobychacko
Copy link
Copy Markdown
Contributor

Merged upstream via 2f48e9c.

@sobychacko sobychacko closed this May 22, 2026
@sobychacko sobychacko self-assigned this May 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

advisors bug Something isn't working tool calling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants