Skip to content

ModelThrottledError

Defined in: src/errors.ts:122

Error thrown when a model provider returns a throttling or rate limit error.

This error indicates that the model API has rate limited the request. Users can handle this error in hooks to implement custom retry strategies using the AfterModelCallEvent.retry mechanism.

new ModelThrottledError(message, options?): ModelThrottledError;

Defined in: src/errors.ts:129

Creates a new ModelThrottledError.

| Parameter | Type | Description | | ---------- | -------------- | --------------------------------------------------------- | | message | string | Error message describing the throttling condition | | options? | ErrorOptions | Optional error options including cause for error chaining |

ModelThrottledError

ModelError.constructor