model.context_exceeded
The inputs exceed what the model can read
| Type | https://mthds.ai/errors/model.context_exceeded |
| Family | model: The model a step names. |
| Domain | input: the caller acts, by changing the request or its inputs |
| Retry | no: repeating the operation fails the same way |
| HTTP status | 422 |
| Raised as | a problem document, sent as the body of an HTTP response or kept in a run's record |
What it means
The prompt built from the inputs passes the model's context window or the number of images it takes.
What to do
Shorten the inputs, split a long document into parts, or send fewer images. The method's author can instead pick a model with a larger window.
Next steps
A problem carries the step aimed at whoever reads it: the first when its reader is the domain's actor, the caller, and the second for any other reader.
| Reader | Kind | Detail |
|---|---|---|
| The domain's actor | change_input |
Send smaller inputs, or fewer images, then send the request again. |
| Any other reader | change_input |
Pass this to the caller, whose inputs exceed what the model '{model}' can read. |
Detail
The problem's detail is written from this template, filled with the occurrence's parameters:
The prompt for the model '
{model}' reaches{count}against a{limit}of{max}.
Parameters
Every parameter is present on every occurrence of the code.
| Name | Type | Description |
|---|---|---|
model |
identifier |
The model. |
limit |
one of context_window, prompt_images |
Which bound the prompt passes: the context window, or the number of images. |
count |
integer |
What the prompt reached. |
max |
integer |
The bound. |
See also
- Error Registry, which describes the members of this page
- Error Codes, every code of the core registry