File size: 1,377 Bytes
876ef78
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
from dataclasses import dataclass
from typing import Dict

@dataclass
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

@dataclass
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),
}