Skip to content

model.output_truncated

The answer was cut at the method's token cap

Type https://mthds.ai/errors/model.output_truncated
Family model: The model a step names.
Domain method: the method's author acts, by changing the method
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 model stopped at the step's max_tokens before finishing its answer.

What to do

Raise the step's max_tokens, or change its prompt so that it asks for a shorter answer.

Next steps

A problem carries the step aimed at whoever reads it: the first when its reader is the domain's actor, the method's author, and the second for any other reader.

Reader Kind Detail
The domain's actor change_method Raise the step's max_tokens above {max_tokens}, or ask for a shorter answer, then run the method again.
Any other reader contact_owner Ask the method's owner to raise the step's token cap.

Detail

The problem's detail is written from this template, filled with the occurrence's parameters:

The model '{model}' stopped at the step's cap of {max_tokens} tokens, after {output_tokens} tokens.

Parameters

Every parameter is present on every occurrence of the code.

Name Type Description
model identifier The model.
max_tokens integer The cap the step sets.
output_tokens integer The tokens the model produced.

See also