The provider refused the request because the conversation, with the reply it was asked to leave room for, does not fit the model's context window.
It is not retryable: the same request overflows again. The caller shortens the conversation (org.llm4s.context, or the agent's ContextWindowMiddleware), lowers maxTokens, or moves to a model with a larger window. It is a type of its own, not a ValidationError, so that a caller can react to it without reading the provider's message.
Value parameters
httpStatus
the HTTP status of the provider's response (usually 400), when mapped from one
limit
the model's context window in tokens, when the provider's message states it
message
the provider's explanation
provider
the provider that refused the request
requestId
the provider's id for the refused request, when the response carried one
requestedTokens
the tokens the request needed, when the provider's message states it
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.