Skip to main content

Module cost_estimator

Module cost_estimator 

Source
Expand description

Pre-flight cost estimation for LLM requests.

Provides token-count heuristics, per-model pricing, and budget-checking before a request is dispatched so that callers can decide whether to proceed, choose a cheaper model, or reject the request entirely.

Structs§

BudgetConfig
Spending limits used to check whether a request is within budget.
CostEstimate
Full cost estimate including budget compliance.
CostEstimator
Pre-flight cost estimation engine.
TokenEstimate
Input/output token count estimate for a request.

Enums§

TaskType
Characterises the kind of work being requested, which influences the expected output token count.