Class OutputTruncationRetryException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
ai.redouble.nucleo.harness.errors.retry.OutputTruncationRetryException
All Implemented Interfaces:
Serializable

public class OutputTruncationRetryException extends RuntimeException
Signals that the provider returned stop_reason=max_tokens and the job should be re-run with a larger output budget. The framework catches this in JobDispatcher.executeWithRetry and restarts the job with a fresh reservation; the caller (normally LLMCall) is expected to have mutated the outgoing message's requestedOutputTokens before rethrowing, so the next iteration's JobRequirements and the SDK's max_tokens field both resolve to the new budget.

This is NOT a RateLimitRetryException or an LLMReadableException: it is a deterministic framework retry, invisible to the LLM and to the end user.

Since:
0.1 (2026-04-15)
Author:
Andrey Santrosyan
See Also:
  • Constructor Details

    • OutputTruncationRetryException

      public OutputTruncationRetryException(String modelName, int previousBudget, int newBudget)
  • Method Details

    • getModelName

      public String getModelName()
    • getPreviousBudget

      public int getPreviousBudget()
    • getNewBudget

      public int getNewBudget()