NoSuchModelError
Namespace: Vercel.AI.Util
public class NoSuchModelError : AiSdkError, ISerializable, IErrorMarkersA provider has no model with the requested id. Maps to NoSuchModelError.
Inheritance: object → Exception → AiSdkError
Implements: ISerializable, IErrorMarkers
Derived: NoSuchProviderError
Constructors
Section titled “Constructors”NoSuchModelError(string, string, string?)
Section titled “NoSuchModelError(string, string, string?)”public NoSuchModelError(string modelId, string modelType, string? message = null)Creates the error. <code class=“paramref”>modelType</code> is a name such as languageModel.
Parameters
| Name | Type | Description |
|---|---|---|
modelId |
string | |
modelType |
string | |
message |
string |
NoSuchModelError(string, string, string, string)
Section titled “NoSuchModelError(string, string, string, string)”protected NoSuchModelError(string errorName, string modelId, string modelType, string message)Creates the error with a subclass error name.
Parameters
| Name | Type | Description |
|---|---|---|
errorName |
string | |
modelId |
string | |
modelType |
string | |
message |
string |
Fields
Section titled “Fields”ErrorMarker
Section titled “ErrorMarker”public const string ErrorMarker = "vercel.ai.error.AI_NoSuchModelError"Marker for IsInstance(object).
Value: string
Properties
Section titled “Properties”ModelId
Section titled “ModelId”public string ModelId { get; }Requested model id.
Value: string
ModelType
Section titled “ModelType”public string ModelType { get; }Requested model type, such as languageModel.
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