Skip to content

NoSuchProviderError

Namespace: Vercel.AI.Util

public sealed class NoSuchProviderError : NoSuchModelError, ISerializable, IErrorMarkers

A registry has no provider with the requested id. Maps to NoSuchProviderError.

Inheritance: object → Exception → AiSdkError → NoSuchModelError

Implements: ISerializable, IErrorMarkers

View source

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

View source

public const string ErrorMarker = "vercel.ai.error.AI_NoSuchProviderError"

Marker for IsInstance(object).

Value: string

View source

public IReadOnlyList<string> AvailableProviders { get; }

Registered provider ids.

Value: IReadOnlyList<string>

View source

public string ProviderId { get; }

Requested provider id.

Value: string

View source

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

View source

Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product