Open
Description
Description
Summary
When attempting to upload a .txt
file (with MIME type text/plain
) using @ai-sdk/azure
(ai v5), I receive an error indicating that this file type is not supported, even though the Azure OpenAI documentation lists text/plain
as a supported MIME type.
Error
Error [AI_UnsupportedFunctionalityError]: 'file part media type text/plain' functionality not supported.
at <unknown> (.next/server/chunks/4744.js:1:42683)
at Array.map (<anonymous>)
at prompt (.next/server/chunks/4744.js:1:41594)
at h.getArgs (.next/server/chunks/4744.js:1:43350)
at async h.doStream (.next/server/chunks/4744.js:1:48893)
at async fn (.next/server/chunks/9464.js:33:48102)
at async (.next/server/chunks/9464.js:33:3017)
at async tw (.next/server/chunks/9464.js:33:898) {
cause: undefined,
functionality: 'file part media type text/plain'
]
Reproduction Steps
- Use
@ai-sdk/azure
(ai v5) to upload a.txt
file. - Observe the error above.
Expected Behavior
.txt
files with MIME type text/plain
should be accepted, as per Azure OpenAI documentation.
Actual Behavior
The SDK throws an AI_UnsupportedFunctionalityError
for text/plain
files.
Additional Information
- According to Azure OpenAI documentation,
text/plain
is a supported file type. - The file is encoded in UTF-8.
AI SDK Version
"@ai-sdk/azure": "2.0.0-beta.1"
"ai": "5.0.0-beta.1"