Class BudgetExceededException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.tnsai.exceptions.TnsAIException
com.tnsai.llm.cost.BudgetExceededException
All Implemented Interfaces:
Serializable

public class BudgetExceededException extends com.tnsai.exceptions.TnsAIException
Exception thrown when a budget limit is exceeded.

This exception is thrown by CostAwareLLMClient when hard budget limits are enforced and a request would exceed them.

See Also:
  • Constructor Details

    • BudgetExceededException

      public BudgetExceededException(BigDecimal currentSpend, BigDecimal limit, BigDecimal estimatedCost)
    • BudgetExceededException

      public BudgetExceededException(String message)
  • Method Details