feat: add optional Codex warm-up scheduler

This commit is contained in:
ejclaw
2026-04-24 18:40:36 +09:00
parent 9b0ddce337
commit bd56a5d765
8 changed files with 706 additions and 5 deletions

View File

@@ -36,6 +36,21 @@ STATUS_CHANNEL_ID= # Discord channel ID for live status updat
# STATUS_SHOW_ROOMS=true # Show room status in dashboard
# STATUS_SHOW_ROOM_DETAILS=false # Show detailed room info
# --- Codex warm-up (optional, disabled by default) ---
# Sends a tiny real Codex prompt to near-zero-usage accounts so their reset
# countdown starts after a fresh quota window. Keep disabled if OpenAI changes
# policy or starts blocking automated warm-up prompts.
# CODEX_WARMUP_ENABLED=false
# CODEX_WARMUP_PROMPT=Reply exactly OK. Do not run tools.
# CODEX_WARMUP_MODEL= # Defaults to CODEX_MODEL
# CODEX_WARMUP_INTERVAL_MS=300000 # Check every 5min
# CODEX_WARMUP_MIN_INTERVAL_MS=18300000 # Per-account minimum gap: 5h5m
# CODEX_WARMUP_STAGGER_MS=1800000 # Global gap between accounts: 30min
# CODEX_WARMUP_MAX_USAGE_PCT=0 # Only warm accounts at/below this 5h usage
# CODEX_WARMUP_MAX_D7_USAGE_PCT=99 # Skip weekly-exhausted accounts
# CODEX_WARMUP_MAX_CONSECUTIVE_FAILURES=2
# CODEX_WARMUP_FAILURE_COOLDOWN_MS=21600000 # Back off 6h after repeated failure
# --- Fallback provider (when Claude/Codex both unavailable) ---
# FALLBACK_ENABLED=true # Enable fallback provider
# FALLBACK_PROVIDER_NAME=kimi # Provider name for logging