Spaces:
Sleeping
Sleeping
Create core/config.py
Browse files- core/config.py +40 -0
core/config.py
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from dataclasses import dataclass
|
| 2 |
+
from typing import Dict
|
| 3 |
+
|
| 4 |
+
@dataclass
|
| 5 |
+
class ModelRate:
|
| 6 |
+
# Price per 1M tokens (USD). Keep provider-agnostic.
|
| 7 |
+
input_per_1m: float
|
| 8 |
+
output_per_1m: float
|
| 9 |
+
cached_input_per_1m: float = 0.0
|
| 10 |
+
reasoning_per_1m: float = 0.0 # optional
|
| 11 |
+
|
| 12 |
+
@dataclass
|
| 13 |
+
class SimConfig:
|
| 14 |
+
# Time model
|
| 15 |
+
minutes_per_tick: int = 30
|
| 16 |
+
|
| 17 |
+
# Budgeting
|
| 18 |
+
budget_usd_soft: float = 5.00
|
| 19 |
+
budget_usd_hard: float = 10.00
|
| 20 |
+
|
| 21 |
+
# Task system
|
| 22 |
+
initial_tasks: int = 24
|
| 23 |
+
new_tasks_per_day: int = 6
|
| 24 |
+
rework_probability_base: float = 0.08 # baseline chance a "completed" task needs rework
|
| 25 |
+
|
| 26 |
+
# Incident injection
|
| 27 |
+
incident_probability_per_day: float = 0.12 # creates urgent tasks
|
| 28 |
+
outage_probability_per_day: float = 0.05 # increases latency + failure chance
|
| 29 |
+
|
| 30 |
+
# Token simulation knobs (when not calling real LLMs)
|
| 31 |
+
est_prompt_tokens_per_task: int = 900
|
| 32 |
+
est_completion_tokens_per_task: int = 250
|
| 33 |
+
est_reasoning_tokens_per_task: int = 0
|
| 34 |
+
|
| 35 |
+
DEFAULT_MODEL_RATES: Dict[str, ModelRate] = {
|
| 36 |
+
# These are placeholders. You can swap with your exact rate cards.
|
| 37 |
+
"economy": ModelRate(input_per_1m=0.20, output_per_1m=0.80, cached_input_per_1m=0.05),
|
| 38 |
+
"balanced": ModelRate(input_per_1m=1.50, output_per_1m=6.00, cached_input_per_1m=0.50),
|
| 39 |
+
"premium": ModelRate(input_per_1m=5.00, output_per_1m=15.00, cached_input_per_1m=1.25),
|
| 40 |
+
}
|