---
url: >-
  https://adk.nht.io/api/@nhtio/adk/batteries/llm/webllm_chat_completions/exceptions/variables/E_WEBLLM_CHAT_COMPLETIONS_CONTEXT_OVERFLOW.md
description: >-
  Thrown when the total token weight of the resolved request exceeds
  `contextWindow`. Only raised when `tokenEncoding` is non-null. Carries
---

# Variable: E\_WEBLLM\_CHAT\_COMPLETIONS\_CONTEXT\_OVERFLOW

```ts
const E_WEBLLM_CHAT_COMPLETIONS_CONTEXT_OVERFLOW: CreatedException<
  [number, number, string, string]
>;
```

Defined in: [src/batteries/llm/webllm\_chat\_completions/exceptions.ts:31](https://github.com/NHTIO/ADK/blob/v1.20261103.0/src/src/batteries/llm/webllm_chat_completions/exceptions.ts#L31)

Thrown when the total token weight of the resolved request exceeds `contextWindow`. Only
raised when `tokenEncoding` is non-null. Carries `{ total, contextWindow, tokenEncoding,
perBucket }` in the message so middleware can target shedding.
