ModelNotFoundError

org.llm4s.error.ModelNotFoundError
See theModelNotFoundError companion object
@Stable
final case class ModelNotFoundError extends LLMError

The provider does not know the model the request named, or the credential has no access to it.

It is not retryable: the same request names the same model. The caller corrects the section's model (Llm4sConfig.listModels() lists what the provider offers), pulls it (Ollama), or falls back to another provider. It is a type of its own, not a ServiceError with status 404, because a 404 is also what a wrong baseUrl answers, and only the provider's reply tells the two apart.

NotFoundError is a missing configuration value, not this.

Value parameters

httpStatus

the HTTP status of the provider's response (usually 404), when mapped from one

message

the provider's explanation

model

the model the request named, when the client that mapped the error knows it

provider

the provider that refused the request

requestId

the provider's id for the refused request, when the response carried one

Attributes

Companion
object
Source
ModelNotFoundError.scala
Graph
Supertypes
trait LLMError
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

This error, carrying the HTTP status of the response it was mapped from.

This error, carrying the HTTP status of the response it was mapped from.

Attributes

Source
ModelNotFoundError.scala

This error, naming the model the request asked for.

This error, naming the model the request asked for.

Attributes

Source
ModelNotFoundError.scala

This error, carrying the provider's id for the refused request.

This error, carrying the provider's id for the refused request.

Attributes

Source
ModelNotFoundError.scala

Inherited methods

Formatted error message with context

Formatted error message with context

Attributes

Inherited from:
LLMError
Source
LLMError.scala

Whether sending the identical request again may succeed, with nobody in the loop: the library's one rule for retrying, which org.llm4s.reliability.RetryPolicy, org.llm4s.reliability.ReliableClient and the agent graph's node retries all apply.

Whether sending the identical request again may succeed, with nobody in the loop: the library's one rule for retrying, which org.llm4s.reliability.RetryPolicy, org.llm4s.reliability.ReliableClient and the agent graph's node retries all apply.

It is true for a RateLimitError, a TimeoutError, a NetworkError, an ExecutionError and a ServiceError whose status is 408, 429 or 5xx, and false for everything else: a request the provider refused as wrong (any other 4xx, a ValidationError, a ContextLengthError, a ModelNotFoundError), a rejected credential, a cancellation, and the two errors that need something to happen first - an OptimisticLockFailure (re-read the record) and a CircuitOpenError (wait for the circuit).

An error type of your own is not retried unless it overrides this member.

Attributes

Inherited from:
LLMError
Source
LLMError.scala

Attributes

Inherited from:
Product

Attributes

Inherited from:
Product

The delay the server asked for before the request is sent again (an HTTP Retry-After header), and only that: None when the server gave none. A delay the library chooses when the server is silent is the retry policy's, never reported here, so "the server said" and "we guessed" stay distinguishable.

The delay the server asked for before the request is sent again (an HTTP Retry-After header), and only that: None when the server gave none. A delay the library chooses when the server is silent is the retry policy's, never reported here, so "the server said" and "we guessed" stay distinguishable.

Attributes

Inherited from:
LLMError
Source
LLMError.scala

Concrete fields

override val code: Option[String]

Optional error code for programmatic handling

Optional error code for programmatic handling

Attributes

Source
ModelNotFoundError.scala
override val context: Map[String, String]

Additional context information

Additional context information

Attributes

Source
ModelNotFoundError.scala