Skip to main content

NO_JSON_ATTEMPTS

Constant NO_JSON_ATTEMPTS 

Source
pub const NO_JSON_ATTEMPTS: u32 = 3;
Expand description

How many times a response carrying no JSON at all is asked for again.

Not the same question as the SDK’s transport retry, and deliberately a small number: each attempt is a full reasoning call. The rule this replaced never retried, justified as “the same prompt truncates the same way” - but that is Extracted::Truncated, a different branch. A response with no JSON at all did not truncate an answer, it never produced one, and in practice it does not repeat: drep’s own gated push failed on a different file each run, and each failing file analyzed cleanly when asked again.

Three total attempts, so two local retries before the provider chain may ask a fallback. Production output has been visibly garbled twice in a row and then parsed unchanged on a later run; the third attempt salvages that case without demoting an otherwise healthy provider.