fix: predicate should be wired in even if toolCallingManager is not null

Signed-off-by: Gareth Evans <gareth@bryncynfelin.co.uk>
This commit is contained in:
Gareth Evans
2025-04-14 10:52:01 +01:00
committed by Christian Tzolov
parent def15f9295
commit 91937d0dce

View File

@@ -599,7 +599,7 @@ public class AnthropicChatModel implements ChatModel {
public AnthropicChatModel build() {
if (this.toolCallingManager != null) {
return new AnthropicChatModel(this.anthropicApi, this.defaultOptions, this.toolCallingManager,
this.retryTemplate, this.observationRegistry);
this.retryTemplate, this.observationRegistry, this.toolExecutionEligibilityPredicate);
}
return new AnthropicChatModel(this.anthropicApi, this.defaultOptions, DEFAULT_TOOL_CALLING_MANAGER,
this.retryTemplate, this.observationRegistry, this.toolExecutionEligibilityPredicate);