Token limits in a thread
Every thread has a token budget set by its model. The counter beside the message box shows how much is used, and the thread stops at the limit.
- AI Studio
- Web
Verified on source code by content-lane-ai-studio. Next review by . Serving build 3abda6b56647, deployed .
A token is roughly a short word or part of one. Every thread has a maximum number of tokens, set by the model it uses, covering everything already in the thread plus what you are about to send.
The counter
Beside the message box are two numbers: tokens used in this thread, and the maximum the model allows. A ring around them fills as the thread grows and turns red at the limit. Before the model catalogue loads it reads -- / --.
Hovering it names both numbers.
What counts towards the limit
- Every message you have sent in this thread.
- Every reply the model has produced in it.
- The text of any persona you have applied, on every message.
- The file listing and README of any repository attached to the thread, on every message.
Because the whole thread is sent each time, the count grows faster the longer the thread runs.
At the limit
The thread stops accepting messages and shows: You have exceeded the token usage limit for this conversation. Please shorten your prompt or start a new thread to continue. The send button is unavailable until you start a new thread.
Nothing is lost. The thread stays readable and exportable.
Staying under it
- Start a new thread for a new subject rather than continuing a long one.
- Keep personas short. See Create a persona.
- Detach repositories you no longer need. See Attach a repository to a thread.
- Choose a model with a larger budget. Limits differ by model, so the same thread can be near the limit on one and comfortable on another.
A different message about a limit
A message headed Max token limit reached with the text You have reached the token limit included in your current plan is about your plan, not the length of the thread. It appears when the model you chose is not covered by what pays for your requests. Choose another model, or see What your requests cost.
Related
- Choose a model — limits are set per model.
- What your requests cost — what you are charged and what can stop a request.
- A reply stopped before it finished — a reply that ends early is a different problem.
Related pages
- What your requests cost — The Plans page in the AI Studio sidebar shows what pays for your requests, which limits can stop them, and a history of what you have used.
- Choose a model — Select the model name at the top of a thread, pick a group, then pick a model. A model picked from a provider group becomes your default.
- A reply stopped before it finished — A reply that ends early carries a note saying who ended it. The note tells you whether to send again, lower the reasoning level, or change model.