Skip to content
docsv0.42.1

OutputTruncatedException

The provider exhausted output tokens; no call from that incomplete message may execute. `retried` is true when the loop already gave the call its one shortened retry and that retry was cut too (greenhouse decisions/0542): the leg ends here, and the message says so.

OutputTruncatedException::__construct()

public function __construct(string $provider, int $maxTokens, string $stopReason = 'length', bool $retried = false):

The limit is the request's value, not a claim about the provider's token usage.

Parameters

Parameters of __construct()
NameTypeDescription
$providerstring
$maxTokensint
$stopReasonstring
$retriedbool