class

AI::Provider::NoSuchModelError

Inherits AI::Provider::AISDKError < Exception < Reference < Object

Error thrown when a requested model does not exist.

This error is raised when attempting to access a model that is not available from the provider.

Constructors

new(*, model_id : String, model_type : ModelType, error_name : String = DEFAULT_ERROR_NAME, message : String | Nil = nil)

Creates a new NoSuchModelError.

Parameters:

  • model_id: The ID of the model that was not found
  • model_type: The type of model (language, embedding, image, etc.)
  • error_name: Optional custom error name
  • message: Optional custom message
Source

Class methods

instance?(error) : Bool

Checks if the given value is an instance of NoSuchModelError.

Source

Instance methods

model_id

The ID of the model that was not found.

Source
model_type

The type of model that was requested.

Source