53 const std::string& finish_reason) {
55 if (!content_empty || !produced_tokens) {
57 }
else if (finish_reason ==
"length") {
59 }
else if (finish_reason ==
"stop") {
76 static const std::string kBudget =
77 "The generation hit its token budget while still inside a reasoning "
78 "block, so no answer was ever produced and the content is empty. This "
79 "is a budget problem: raise max_tokens for this tier.";
80 static const std::string kStopped =
81 "The model ended the turn while still inside an unterminated reasoning "
82 "block, so the content is empty. finish_reason is 'stop', NOT 'length' "
83 "— this is not a budget problem and raising max_tokens will not help. "
84 "The prompt or tier configuration is not converging on an answer.";
85 static const std::string kUnknown =
86 "The turn produced tokens but delivered no content, and the finish "
87 "reason does not explain why. This is not a parse error; report it "
88 "with the raw generation attached.";
Activate model on GPU (WARM → ACTIVE).
std::string explain_empty_content(EmptyContentCause cause)
Operator-facing explanation for an empty-content turn.
EmptyContentCause
Why a turn produced tokens but delivered no content.
@ budget_truncated
finish_reason == "length": ran out of tokens.
@ unknown
Empty for a reason this rule cannot attribute.
@ not_empty
Content survived; nothing to explain.
@ model_stopped
Model ended the turn while still reasoning.
EmptyContentCause diagnose_empty_content(bool content_empty, bool produced_tokens, const std::string &finish_reason)
Classify an empty-content turn from what the decode reported.