pub enum Warning {
Unsupported {
feature: String,
details: Option<String>,
},
Compatibility {
feature: String,
details: Option<String>,
},
Deprecated {
setting: String,
message: String,
},
Other {
message: String,
},
}Expand description
Provider-emitted warning about a model call.
Mirrors SharedV4Warning (ai-sdk
packages/provider/src/shared/v4/shared-v4-warning.ts). The four
variants are wire-compatible with the upstream type tag:
unsupported / compatibility / deprecated / other.
Variants§
Unsupported
A feature is not supported by the model — the request was sent
without it and the result may differ from the caller’s intent.
Mirrors upstream { type: 'unsupported', feature, details? }.
Fields
Compatibility
A compatibility-mode feature is in use that may produce suboptimal
results (the request still went through but with a coerced or
downgraded shape). Mirrors upstream
{ type: 'compatibility', feature, details? }.
Fields
Deprecated
A deprecated setting / feature is being used; the message explains
the recommended replacement. Mirrors upstream
{ type: 'deprecated', setting, message }.
Fields
Other
Generic warning for cases that don’t fit the structured variants.
Mirrors upstream { type: 'other', message }.