github vercel/ai @ai-sdk/xai@3.0.85

latest releases: @ai-sdk/xai@2.0.71, @ai-sdk/vue@2.0.182, @ai-sdk/svelte@3.0.182...
7 hours ago

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_url

    The 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 threw UnsupportedFunctionalityError for any file part whose mediaType did not start with image/.

    When a file part is passed with data: URL and a non-image media type, the provider now emits { type: 'input_file', file_url }. application/pdf and text/* are also added to supportedUrls so 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_id for 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

Don't miss a new ai release

NewReleases is sending notifications on new releases.