diff --git a/src/magentic/chat_model/anthropic_chat_model.py b/src/magentic/chat_model/anthropic_chat_model.py index bdaabf6..1e94eb3 100644 --- a/src/magentic/chat_model/anthropic_chat_model.py +++ b/src/magentic/chat_model/anthropic_chat_model.py @@ -109,7 +109,7 @@ def _(message: UserImageMessage[Any]) -> MessageParam: "role": AnthropicMessageRole.USER.value, "content": [ { - "type": "image", + "type": "document" if mime_type == "application/pdf" else "image", "source": { "type": "base64", "media_type": image_bytes.mime_type,