# Vercel's AI SDK adds safetyIdentifier option for xAI Responses calls

published: 2026-11-07T20:05:34.549Z
topic: frameworks
source: https://github.com/vercel/ai/releases/tag/%40ai-sdk%2Fxai%403.0.151
url: https://aiagentnews.io/stories/vercel-s-ai-sdk-adds-safetyidentifier-option-for-xai-responses-calls

Version 3.0.151 of the @ai-sdk/xai package adds a safetyIdentifier provider option for the Responses API. It lets developers tie a policy violation to one end user and reads the value back in provider metadata.

Vercel has released version 3.0.151 of @ai-sdk/xai, the xAI provider in its AI SDK. The release is a patch-level change that adds one option to the Responses provider.

When a developer sets safetyIdentifier, the SDK sends a safety_identifier value with Responses API requests. xAI can use that value to attribute a policy violation to a single end user.

The echoed value is exposed on providerMetadata.xai.safetyIdentifier. The release also updates the @ai-sdk/provider-utils dependency to 4.0.65 and @ai-sdk/openai-compatible to 2.0.92.

## Why it matters if you build agents

Developers building agents on xAI models can now pass an end-user identifier through the Responses API, so a policy violation can be linked to a user.

Teams that serve many end users should set the option per user and read providerMetadata.xai.safetyIdentifier to match results against their own records.
