Exception: RobotLab::BudgetExceeded

Inherits:
Error
  • Object
show all
Defined in:
lib/robot_lab/error.rb

Overview

Raised when a Robot's configured token or cost budget is already exhausted before an LLM call is attempted (see RobotLab::Budget::Ledger). Distinct from InferenceError, which covers a call that completed but pushed cumulative usage over budget — BudgetExceeded means the call was refused outright.

Examples:

raise BudgetExceeded, "budget exceeded for cost: 0.62 > 0.5"