Skip to content

TokenBudgetExceededException

NexusLabs.Needlr.AgentFramework

NexusLabs.Needlr.AgentFramework.Budget

TokenBudgetExceededException Class

Thrown when a pipeline's token budget is exceeded.

public sealed class TokenBudgetExceededException : System.Exception

Inheritance System.Object 🡒 System.Exception 🡒 TokenBudgetExceededException

Constructors

TokenBudgetExceededException(long, long) Constructor

public TokenBudgetExceededException(long currentTokens, long maxTokens);

Parameters

currentTokens System.Int64

Accumulated token count.

maxTokens System.Int64

The budget limit that was exceeded.

Properties

TokenBudgetExceededException.CurrentTokens Property

Gets the number of tokens accumulated at the time the budget was exceeded.

public long CurrentTokens { get; }

Property Value

System.Int64

TokenBudgetExceededException.MaxTokens Property

Gets the maximum token budget that was exceeded.

public long MaxTokens { get; }

Property Value

System.Int64