The Vercel AI SDK, specifically the @ai-sdk/xai package, received an update on August 24. This patch, identified as f33a407, modifies how image moderation blocks are handled within the XAI provider, now reporting them as content policy errors.
Key Points
- The
@ai-sdk/xaipackage was updated to version 3.0.125. - The update was released on August 24.
- The change addresses a fix (
f33a407) for the XAI provider. - Image moderation blocks are now reported as content policy errors.
- The update also included dependency changes for
@ai-sdk/provider-utilsto 4.0.47 and@ai-sdk/openai-compatibleto 2.0.71.
Context
According to the Vercel AI SDK Changelog, this update specifically targets the XAI provider within the SDK. The modification ensures that instances where images are blocked due to moderation policies are consistently categorized as content policy errors. This standardization can help developers better understand and handle moderation outcomes.
Why It Matters
This update affects developers using the Vercel AI SDK with the XAI provider, particularly those integrating image moderation. It clarifies how moderation failures are communicated, potentially streamlining error handling and policy enforcement within applications.
What To Do
- Developers using
@ai-sdk/xaishould note the change in how image moderation blocks are reported. - Review existing error handling logic for content policy errors to ensure compatibility with this new classification.
- Check the updated dependency versions for
@ai-sdk/provider-utilsand@ai-sdk/openai-compatible. - Watch for further documentation or guidance from Vercel regarding this specific error classification.
