# Context windows, request limits, and timeouts

> How much a model can hold, how large a request can be, how long it can run, and how to get past each.

- Canonical: https://big-agi.com/docs/context-and-limits
- Minimum tier: open  [Open ⊂ Free ⊂ Pro - a tier only ever ADDS to the Open baseline]
- Kind: reference · Last content update generation: 2026-07-27 · Review by: 2026-10-25
- Answers: Why did it forget what I said earlier in the chat? · It failed with Request Too Large - what is the actual limit? · Does a longer conversation cost more per message?

Every chat turn sends the whole conversation again, and a configurable policy decides which earlier blocks go with it, so the turn fits. You set how many images are re-sent, and how many pieces of encrypted content go back to the original encryptor.



## The limits

| Limit | The number | Whose limit it is | How to get past it |
|---|---|---|---|
| **Request size** | About 4.5 MB for the whole request - message, history and attachments together | The edge network in front of the hosted app - Free and Pro | Turn on [Direct Connection](/docs/feature-direct-connection); hide old messages with **Cleanup**; remove large attachments; or change the policy |
| **Request duration** | Five minutes from send to last token | The same edge network - Free and Pro | Turn on [Direct Connection](/docs/feature-direct-connection), or use a faster model |
| **[Context window](/docs/model-settings)** | Whatever the model states - it is on the model's own entry in your list | The model | A model with a bigger window, or a shorter history |
| **Reply length** | The model's output limit, i.e. Maximum Tokens | The model, plus your settings | Press `Continue...`, or raise Maximum Tokens |

The first two belong to the hosted deployment, not to the software. Run your own instance and they become whatever your proxy and runtime impose. The error text follows: `the request size limit of the server` there, and the edge named only on the hosted app.

> **Direct Connection works only with your API key stored in the browser**, and with an AI service that permits direct browser calls (CORS). Where it cannot be used, requests route through the Big-AGI fast edge servers instead - everything still works, within the standard upload size and time limits.

A refused request comes back as a card:

```
Request Too Large
  **Experimental:** enable Direct Connection to <vendor> to work around size limitations.
  [ Direct Connection - Now Try Again ]
```

That offer appears where your model's service qualifies, and switches the conversation in place.

## The badge at the bottom of the composer

| Badge colour | What it means |
|---|---|
| amber | under a quarter of the model's window would remain after this turn |
| red | the turn no longer fits, and the number becomes how many tokens you are over |

The badge counts the message you are typing, and its colour says whether the turn fits. Hover it for the arithmetic:

```
▶ N available message tokens

 = Model max tokens: ...
     - This message: ...
          - History: ...
     - Max response: ...
```

Over the limit, that heading reads `excess message tokens` instead, prefixed `⚠️`. On phones the count is an approximation rather than an exact tokenisation. Where the model has prices attached, the badge shows the turn's cost in place of the token count. The tooltip adds the cost breakdown.

## Working through a long document

1. **One chat per section.** A fresh conversation resets the history you re-send every turn.
2. **Prune in place.** The right-hand panel's **Cleanup** hides messages you no longer need from the request, keeping them on screen.
3. **Drop attachments once you have their answer.** They are re-sent every turn until removed.
4. **Prefer text over page images.** A PDF sent as extracted text costs a fraction of the same PDF sent as page pictures ([attachments](/docs/feature-attachments)).

## When this doesn't work

Each message on screen maps to exactly one of the limits above.

| On screen | The limit | Where to go |
|---|---|---|
| `Request Too Large`, or `**Request too large**` in an exported chat | Request size | This page, above |
| `An unexpected issue occurred: **connection terminated**.` | Request duration - the edge cut a live stream | [Stalled or truncated answers](/docs/issue-messages) |
| `An unexpected issue occurred: **network error**.` | Your own connection dropped | [Stalled or truncated answers](/docs/issue-messages) |
| `The AI provider interrupted mid-stream: **upstream dropped**.` | The AI service closed the socket - not a Big-AGI limit | [Stalled or truncated answers](/docs/issue-messages) |
| `Token limit hit.` with a `Continue...` button | Reply length | Press `Continue...`, or raise **Maximum Tokens** |

## Related

- [Attachments and outputs](/docs/feature-attachments)
- [Model settings](/docs/model-settings)
- [Direct Connection](/docs/feature-direct-connection)
- [Stalled or truncated answers](/docs/issue-messages)
