Skip to content

Commit ec7ec58

Browse files
committed
docs(budget): document model_path requirement
1 parent 4d38cd4 commit ec7ec58

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

evaluators/contrib/budget/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ ModelPricing(input_per_1k=0.04, output_per_1k=0.16)
9999

100100
`input_per_1k` is applied to input tokens. `output_per_1k` is applied to output tokens.
101101

102-
Pricing is required when any rule uses `limit_unit="usd_cents"`. Token-only rules can omit pricing. If an event uses a model that is not in the pricing table and a cost rule exists, `unknown_model_behavior="block"` fails closed. Use `"warn"` to log a warning and treat the cost as 0.
102+
Pricing and `model_path` are required when any rule uses `limit_unit="usd_cents"`. Token-only rules can omit both. If an event uses a model that is not in the pricing table and a cost rule exists, `unknown_model_behavior="block"` fails closed. Use `"warn"` to log a warning and treat the cost as 0.
103103

104104
## Dual Ceiling Pattern
105105

evaluators/contrib/budget/src/agent_control_evaluator_budget/budget/config.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,13 @@ class BudgetEvaluatorConfig(EvaluatorConfig):
7979
pricing table and a cost-based rule exists. block=fail closed,
8080
warn=log warning and treat cost as 0.
8181
pricing: Optional model pricing table. Maps model name to ModelPricing.
82-
Used to derive cost in USD from token counts and model name.
82+
Required when any rule uses limit_unit="usd_cents". Used to
83+
derive cost in USD from token counts and model name.
8384
token_path: Dot-notation path to extract token usage from step
8485
data (e.g. "usage.total_tokens"). If None, looks for standard
8586
fields (input_tokens, output_tokens, total_tokens, usage).
8687
model_path: Dot-notation path to extract model name (for pricing lookup).
88+
Required when any rule uses limit_unit="usd_cents".
8789
metadata_paths: Mapping of metadata field name to dot-notation path
8890
in step data. Used to extract scope dimensions (channel, user_id, etc).
8991
"""

0 commit comments

Comments
 (0)