NoSuchProviderError
Namespace: Vercel.AI.Util
public sealed class NoSuchProviderError : NoSuchModelError, ISerializable, IErrorMarkersA registry has no provider with the requested id. Maps to NoSuchProviderError.
Inheritance: object → Exception → AiSdkError → NoSuchModelError
Implements: ISerializable, IErrorMarkers
Constructors
Section titled “Constructors”NoSuchProviderError(string, string, string, IReadOnlyList<string>, string?)
Section titled “NoSuchProviderError(string, string, string, IReadOnlyList<string>, string?)”public NoSuchProviderError(string modelId, string modelType, string providerId, IReadOnlyList<string> availableProviders, string? message = null)Creates the error.
Parameters
| Name | Type | Description |
|---|---|---|
modelId |
string | |
modelType |
string | |
providerId |
string | |
availableProviders |
IReadOnlyList<string> | |
message |
string |
Fields
Section titled “Fields”ErrorMarker
Section titled “ErrorMarker”public const string ErrorMarker = "vercel.ai.error.AI_NoSuchProviderError"Marker for IsInstance(object).
Value: string
Properties
Section titled “Properties”AvailableProviders
Section titled “AvailableProviders”public IReadOnlyList<string> AvailableProviders { get; }Registered provider ids.
Value: IReadOnlyList<string>
ProviderId
Section titled “ProviderId”public string ProviderId { get; }Requested provider id.
Value: string
Methods
Section titled “Methods”IsInstance(object?)
Section titled “IsInstance(object?)”public static bool IsInstance(object? error)Returns whether <code class=“paramref”>error</code> carries this error’s marker.
Parameters
| Name | Type | Description |
|---|---|---|
error |
object |
Returns: bool
Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product