Patch Changes
-
a727da4: chore: ensure consistent import handling and avoid import duplicates or cycles
-
fa6e62b: feat(provider/xai): support non-image file parts (PDF, text, CSV) in the Responses API via
input_file+file_urlThe xAI Responses API accepts
{ type: 'input_file', file_url }for non-image documents (see https://docs.x.ai/docs/guides/chat-with-files), but the AI SDK xAI Responses provider previously threwUnsupportedFunctionalityErrorfor any file part whosemediaTypedid not start withimage/.When a file part is passed with
data: URLand a non-image media type, the provider now emits{ type: 'input_file', file_url }.application/pdfandtext/*are also added tosupportedUrlsso the SDK does not download them to bytes before reaching the converter.Inline-byte (base64) inputs for non-image media types continue to throw, since xAI's Responses API requires either a public URL or a pre-uploaded
file_idfor non-image documents. -
Updated dependencies [a727da4]
- @ai-sdk/openai-compatible@2.0.43
- @ai-sdk/provider-utils@4.0.25
- @ai-sdk/provider@3.0.10