Skip to content

GatewayModelNotFoundError

Namespace: Vercel.AI.Gateway

public sealed class GatewayModelNotFoundError : GatewayError, ISerializable

The requested model is not available.

Inheritance: object → Exception → AiSdkException → GatewayError

Implements: ISerializable

View source

GatewayModelNotFoundError(string?, int, string?, Exception?, string?)

Section titled “GatewayModelNotFoundError(string?, int, string?, Exception?, string?)”
public GatewayModelNotFoundError(string? message = null, int statusCode = 404, string? modelId = null, Exception? cause = null, string? generationId = null)

Creates a model-not-found error.

Parameters

Name Type Description
message string
statusCode int
modelId string
cause Exception
generationId string

View source

public string? ModelId { get; }

Model id from the error param, when it was a { modelId } object.

Value: string

View source

public override string Type { get; }

Gateway error type.

Value: string

View source

public static bool IsInstance(Exception? error)

True when <code class=“paramref”>error</code> is this error.

Parameters

Name Type Description
error Exception

Returns: bool

View source

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