org.llm4s.error.RateLimitError
See theRateLimitError companion object
@Stable
final case class RateLimitError extends LLMError, RecoverableError
Raised when the LLM provider rejects the request due to rate limiting.
This is a RecoverableError: it is safe to retry after waiting. The client can handle this automatically when configured with a retry policy. It provides intelligent retry delays, utilizing provider hints when available.
Value parameters
- message
-
human-readable description of the rate limit
- origin
-
whether this was rejected locally (never reached the provider) or by the provider itself; defaults to RateLimitOrigin.UpstreamProvider since every existing constructor call maps a provider-side rejection
- provider
-
the name of the LLM provider (e.g., "openai", "anthropic")
- retryAfter
-
optional delay the provider asked for before retrying (e.g. an HTTP
Retry-Afterheader)
Attributes
- Companion
- object
- Graph
-
- Supertypes
-
trait RecoverableErrortrait LLMErrortrait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass Any
Members list
In this article