Skip to content

provider/anthropic: enforce tool sequencing, remove self-repair/validation - #1680

Closed
rumpl wants to merge 1 commit into
docker:mainfrom
rumpl:anthropic-tools
Closed

rumpl wants to merge 1 commit into
docker:mainfrom
rumpl:anthropic-tools

Conversation

@rumpl

@rumpl rumpl commented Feb 10, 2026

Copy link
Copy Markdown
Member

We should not need to validate and self-repair things, we should instead fail fast and make really sure that we have the right tools and tool results in the session.

An attempt at fixing #1644

…ation

Stop inserting synthetic tool_result blocks and remove preflight
sequencing validators. Instead, enforce Anthropic tool_use/tool_result
adjacency and ID matching during message conversion (and preserve
tool-call blocks during history trimming) so invalid histories fail fast
with clear errors.

Signed-off-by: Djordje Lukic <[email protected]>
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.

2 participants