providerMetadata
A unified convention in the AI SDK that allows each provider to attach provider-specific fields to response objects; callers access additional information returned by the vendor through providerMetadata.<providerName> for auditing, billing, and troubleshooting.
Timeline (last 90 days)
The SDK echoes the safety_identifier value returned by the server on providerMetadata.xai.safetyIdentifier.
The safetyIdentifier option exposes the echoed value on providerMetadata.xai.safetyIdentifier.
providerMetadata is a unified AI SDK convention that allows different providers to attach their own specific fields to the response object without polluting the generic return structure.
providerMetadata is a nested dictionary indexed by provider name, allowing vendors to return private data without breaking the unified interface.
The cost field is placed in providerMetadata rather than the top-level usage because it has not yet been abstracted into a cross-vendor common contract.
All Facts (5)
The SDK echoes the safety_identifier value returned by the server on providerMetadata.xai.safetyIdentifier.
50%UnverifiedThe safetyIdentifier option exposes the echoed value on providerMetadata.xai.safetyIdentifier.
50%UnverifiedproviderMetadata is a unified AI SDK convention that allows different providers to attach their own specific fields to the response object without polluting the generic return structure.
50%UnverifiedproviderMetadata is a nested dictionary indexed by provider name, allowing vendors to return private data without breaking the unified interface.
50%UnverifiedThe cost field is placed in providerMetadata rather than the top-level usage because it has not yet been abstracted into a cross-vendor common contract.
50%