Skip to content

Continue after tool calls in Anthropic responses - #396

Merged
mattt merged 1 commit into
mainfrom
mattt/anthropic-tool-continuation
Nov 6, 2026
Merged

mattt merged 1 commit into
mainfrom
mattt/anthropic-tool-continuation

Conversation

@mattt

@mattt mattt commented Nov 5, 2026

Copy link
Copy Markdown
Collaborator

This PR makes AnthropicLanguageModel's respond continue after tool calls in sessions without a dynamic profile. Before this change, it made one request, ran the tools, and returned that message's text, so the model never saw the tool outputs, and a structured response could throw a decoding error because the message had no JSON text. The stream and the other providers already continue, so this removes the hasDynamicProfile gate and sends the tool results in a follow-up request until the model answers, with maximumToolRounds and a delegate's .stop applying as they do elsewhere.

@mattt
mattt merged commit 5fee6ea into main Nov 6, 2026
12 checks passed
@mattt
mattt deleted the mattt/anthropic-tool-continuation branch November 6, 2026 00:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant