Spaces:
Sleeping
Sleeping
| from dataclasses import dataclass | |
| from typing import Dict | |
| class ModelRate: | |
| # Price per 1M tokens (USD). Keep provider-agnostic. | |
| input_per_1m: float | |
| output_per_1m: float | |
| cached_input_per_1m: float = 0.0 | |
| reasoning_per_1m: float = 0.0 # optional | |
| class SimConfig: | |
| # Time model | |
| minutes_per_tick: int = 30 | |
| # Budgeting | |
| budget_usd_soft: float = 5.00 | |
| budget_usd_hard: float = 10.00 | |
| # Task system | |
| initial_tasks: int = 24 | |
| new_tasks_per_day: int = 6 | |
| rework_probability_base: float = 0.08 # baseline chance a "completed" task needs rework | |
| # Incident injection | |
| incident_probability_per_day: float = 0.12 # creates urgent tasks | |
| outage_probability_per_day: float = 0.05 # increases latency + failure chance | |
| # Token simulation knobs (when not calling real LLMs) | |
| est_prompt_tokens_per_task: int = 900 | |
| est_completion_tokens_per_task: int = 250 | |
| est_reasoning_tokens_per_task: int = 0 | |
| DEFAULT_MODEL_RATES: Dict[str, ModelRate] = { | |
| # These are placeholders. You can swap with your exact rate cards. | |
| "economy": ModelRate(input_per_1m=0.20, output_per_1m=0.80, cached_input_per_1m=0.05), | |
| "balanced": ModelRate(input_per_1m=1.50, output_per_1m=6.00, cached_input_per_1m=0.50), | |
| "premium": ModelRate(input_per_1m=5.00, output_per_1m=15.00, cached_input_per_1m=1.25), | |
| } | |