You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ToolUseBlock has caller: Optional[Caller] = None which is in conflict with ToolUseBlockParam which has caller: Caller (total=False). This means if you convert ToolUseBlock to ToolUseBlockParam using .to_dict() method the caller field errors.
Symptom for me: in Bedrock client after a tool is used sending back response gives Error code: 400 - {'message': 'messages.13.content.1.tool_use.caller: Input should be a valid dictionary or object to extract fields from'}. Doesn't happen with vertex/anthropic clients. Possibly in bedrock client 'caller' field is being set, and thus not excluded in to_dict() method. Explicit .to_dict(exclude_none=True) works
ToolUseBlockhascaller: Optional[Caller] = Nonewhich is in conflict withToolUseBlockParamwhich hascaller: Caller(total=False). This means if you convert ToolUseBlock to ToolUseBlockParam using .to_dict() method the caller field errors.Error code: 400 - {'message': 'messages.13.content.1.tool_use.caller: Input should be a valid dictionary or object to extract fields from'}. Doesn't happen with vertex/anthropic clients. Possibly in bedrock client 'caller' field is being set, and thus not excluded in to_dict() method. Explicit.to_dict(exclude_none=True)works