Full cost model: marginal power, labor, profit, live config
Cost model: - Marginal billing: only charge for watts above idle - Dedicated billing: charge for all uptime (optional) - Labor rate: $/hr for operator time, manually logged - Profit margin: percentage markup on electricity cost - All parameters adjustable live via POST /config Dashboard shows: - Cost breakdown with progress bar - Power model (idle→load for GPU and system) - Marginal watts per inference call - Labor hours + labor cost - Total owed (electricity + labor + margin) - GPU utilization, temperature, power draw - Avg cost per request, estimated remaining requests Endpoints: - GET /config — view current cost config - POST /config — update any parameter live - GET /stats — full usage stats + cost config (auth required) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
+22
-5
@@ -1,7 +1,24 @@
|
||||
# Mortdecai Gateway Configuration
|
||||
# All values can also be adjusted live via POST /config
|
||||
|
||||
# Auth
|
||||
API_KEY=mk_change_this_to_a_real_key
|
||||
GPU_TDP_WATTS=54
|
||||
SYSTEM_OVERHEAD_WATTS=30
|
||||
ELECTRICITY_RATE=0.15
|
||||
SPENDING_CAP=10.00
|
||||
ALLOW_MODEL_UPDATES=false
|
||||
|
||||
# Power model
|
||||
GPU_IDLE_WATTS=15 # GPU at idle (watts)
|
||||
GPU_LOAD_WATTS=54 # GPU during inference (watts)
|
||||
SYSTEM_IDLE_WATTS=45 # Whole system idle (watts)
|
||||
SYSTEM_INFERENCE_WATTS=65 # Whole system during inference (watts)
|
||||
|
||||
# Billing
|
||||
ELECTRICITY_RATE=0.15 # $/kWh
|
||||
BILLING_MODE=marginal # "marginal" (only extra watts) or "dedicated" (all uptime)
|
||||
BASE_RATE_PER_HOUR=0.00 # $/hr base (dedicated mode only)
|
||||
SPENDING_CAP=10.00 # $ before gateway stops accepting
|
||||
|
||||
# Labor & profit
|
||||
LABOR_RATE_PER_HOUR=0.00 # $/hr for setup/maintenance time
|
||||
PROFIT_MARGIN=0.00 # Markup multiplier (0.10 = 10%)
|
||||
|
||||
# Features
|
||||
ALLOW_MODEL_UPDATES=false # Allow remote model push via /admin/update-model
|
||||
|
||||
Reference in New Issue
Block a user