Skip to content

ContextWindowOverflowError

Defined in: src/errors.ts:39

Error thrown when input exceeds the model’s context window.

This error indicates that the combined length of the input (prompt, messages, system prompt, and tool definitions) exceeds the maximum context window size supported by the model.

new ContextWindowOverflowError(message): ContextWindowOverflowError;

Defined in: src/errors.ts:45

Creates a new ContextWindowOverflowError.

| Parameter | Type | Description | | --------- | -------- | --------------------------------------------- | | message | string | Error message describing the context overflow |

ContextWindowOverflowError

ModelError.constructor