Product
BAML
Describe the bug
Model (gemini) return 400 when the param of test is an array of file
Unspecified error code: 400 Request failed with status code: 400 Bad Request,
{
"error": {
"code": 400,
"message": "Unsupported MIME type: image/pdf",
"status": "INVALID_ARGUMENT"
}
}
Reproduction Steps
Make a test like this
test ExtractContractStructureTest {
functions [ExtractContractStructure]
args {
contract_files [
{
file "../files/test.pdf"
}
]
}
}
on which contract files have type: (pdf | image)[]
And then it will return
Unspecified error code: 400 Request failed with status code: 400 Bad Request,
{
"error": {
"code": 400,
"message": "Unsupported MIME type: image/pdf",
"status": "INVALID_ARGUMENT"
}
}
BAML Version
0.214.0
Language/Framework
Node.js
LLM Provider
Google
LLM Model
gemini-2.5-flash-lite
Operating System
macOS
Browser
Safari
Code Editor
VS Code