multiple: permit optional fields on multimodal content blocks (#30887)

Instead of stuffing provider-specific fields in `metadata`, they can go
directly on the content block.
This commit is contained in:
ccurme
2025-04-17 08:48:46 -04:00
committed by GitHub
parent 83b66cb916
commit 86d51f6be6
7 changed files with 27 additions and 17 deletions

View File

@@ -96,7 +96,7 @@ class TestOpenAIStandard(ChatModelIntegrationTests):
"source_type": "base64",
"mime_type": "application/pdf",
"data": pdf_data,
"metadata": {"filename": "my-pdf"}, # OpenAI requires a filename
"filename": "my-pdf", # OpenAI requires a filename
},
]
)

View File

@@ -676,7 +676,7 @@ def test_format_message_content() -> None:
"source_type": "base64",
"data": "<base64 data>",
"mime_type": "application/pdf",
"metadata": {"filename": "my_file"},
"filename": "my_file",
}
]
expected = [