Skip to content

ContextOverflowError

The prompt exceeded the model’s context window. Retryable after truncation.

new ContextOverflowError(provider, cause?): ContextOverflowError

string

Error

ContextOverflowError

ModelError.constructor

readonly optional cause?: Error

Original error that caused this one, if any.

ModelError.cause


code: string

Machine-readable error code (e.g., “ABORT”, “RATE_LIMIT”, “TOOL_DENIED”).

ModelError.code


readonly provider: string

Provider name (e.g., “anthropic”, “openai”).

ModelError.provider


readonly retryable: boolean

Whether this error can be retried by retry middleware.

ModelError.retryable


readonly optional statusCode?: number

HTTP status code from the provider API, if available.

ModelError.statusCode