Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion instructor/providers/anthropic/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
from typing import Any, TypedDict, Union

from pydantic import ValidationError
from ...core.exceptions import ValidationError as InstructorValidationError

from ...mode import Mode
from ...processing.schema import generate_anthropic_schema
Expand Down Expand Up @@ -157,7 +158,7 @@ def reask_anthropic_tools(
assistant_content.append(content.model_dump()) # type: ignore
if (
content.type == "tool_use"
and isinstance(exception, ValidationError)
and isinstance(exception, ValidationError | InstructorValidationError)
and content.name == exception.title
):
tool_use_id = content.id
Expand Down