ModelCapability
Namespace: Vercel.AI
public sealed class ModelCapabilitySupport declared by a provider’s model catalog. Upstream ModelCapability
(boolean | 'unknown' | { condition: string }). Unknown is distinct from unsupported.
A condition describes when support is available; it is documentation, not an expression to execute.
Inheritance: object
Fields
Section titled “Fields”Supported
Section titled “Supported”public static readonly ModelCapability SupportedSupported.
Value: ModelCapability
Unknown
Section titled “Unknown”public static readonly ModelCapability UnknownSupport is not declared. Upstream 'unknown'.
Value: ModelCapability
Unsupported
Section titled “Unsupported”public static readonly ModelCapability UnsupportedNot supported.
Value: ModelCapability
Properties
Section titled “Properties”Condition
Section titled “Condition”public string? Condition { get; }When support is available, for the { condition } form. Null otherwise.
Value: string
IsSupported
Section titled “IsSupported”public bool IsSupported { get; }True when support is declared as true.
Value: bool
IsUnknown
Section titled “IsUnknown”public bool IsUnknown { get; }True when support is declared as 'unknown'.
Value: bool
Methods
Section titled “Methods”From(bool)
Section titled “From(bool)”public static ModelCapability From(bool supported)Maps a boolean to Supported or Unsupported.
Parameters
| Name | Type | Description |
|---|---|---|
supported |
bool |
Returns: ModelCapability
When(string)
Section titled “When(string)”public static ModelCapability When(string condition)The { condition } form.
Parameters
| Name | Type | Description |
|---|---|---|
condition |
string |
Returns: ModelCapability
Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product