Anurag commited on
Commit
73b8a17
·
unverified ·
1 Parent(s): f570788

Update comments and instructions in .env.example

Browse files
Files changed (1) hide show
  1. .env.example +19 -1
.env.example CHANGED
@@ -131,12 +131,29 @@ LLM_MODEL=anthropic/claude-sonnet-4-5
131
  # Keys are rotated round-robin on every request — useful when you
132
  # have multiple accounts or want to spread rate-limit quota.
133
  #
 
 
 
 
 
 
 
134
  # Pattern: <PROVIDER>_API_KEYS=key1,key2,key3
135
  # Fallback order: plural pool → singular key → LLM_API_KEY (optional)
136
  # Set false only if you want to disable global LLM_API_KEY fallback
137
  # across providers.
138
  LLM_API_KEY_FALLBACK_ENABLED=true
139
  #
 
 
 
 
 
 
 
 
 
 
140
  # Uncomment and fill in only the providers you use:
141
  #
142
  # ANTHROPIC_API_KEYS=sk-ant-key1,sk-ant-key2,sk-ant-key3
@@ -147,7 +164,8 @@ LLM_API_KEY_FALLBACK_ENABLED=true
147
  # KILOCODE_API_KEYS=key1,key2
148
  # OPENCODE_API_KEYS=key1,key2
149
  # ZAI_API_KEYS=key1,key2
150
- # MOONSHOT_API_KEYS=key1,key2
 
151
  # MINIMAX_API_KEYS=key1,key2
152
  # XIAOMI_API_KEYS=key1,key2
153
  # VOLCANO_ENGINE_API_KEYS=key1,key2
 
131
  # Keys are rotated round-robin on every request — useful when you
132
  # have multiple accounts or want to spread rate-limit quota.
133
  #
134
+ # Smart backoff: when a key gets a 429/402 response, it is temporarily
135
+ # suspended so other keys handle traffic.
136
+ # Strike 1 → suspended for KEY_BLACKLIST_COOLDOWN_MS (default 60 s)
137
+ # Strike 2 → suspended for KEY_BLACKLIST_COOLDOWN_MS × 4 (default 4 min)
138
+ # Strike 3 → suspended for 24 h (quota likely exhausted — skipped all day)
139
+ # A successful response resets the strike counter for that key.
140
+ #
141
  # Pattern: <PROVIDER>_API_KEYS=key1,key2,key3
142
  # Fallback order: plural pool → singular key → LLM_API_KEY (optional)
143
  # Set false only if you want to disable global LLM_API_KEY fallback
144
  # across providers.
145
  LLM_API_KEY_FALLBACK_ENABLED=true
146
  #
147
+ # Base backoff duration (ms) after the first 429 on a key (default: 60 s).
148
+ # Increases exponentially on repeated failures.
149
+ # KEY_BLACKLIST_COOLDOWN_MS=60000
150
+ #
151
+ # Number of consecutive 429/quota errors before a key is suspended for 24 h.
152
+ # KEY_MAX_STRIKES=3
153
+ #
154
+ # Note: KIMI_API_KEYS and MOONSHOT_API_KEYS share the same API endpoint
155
+ # (api.moonshot.cn) and are combined into one rotation pool automatically.
156
+ #
157
  # Uncomment and fill in only the providers you use:
158
  #
159
  # ANTHROPIC_API_KEYS=sk-ant-key1,sk-ant-key2,sk-ant-key3
 
164
  # KILOCODE_API_KEYS=key1,key2
165
  # OPENCODE_API_KEYS=key1,key2
166
  # ZAI_API_KEYS=key1,key2
167
+ # MOONSHOT_API_KEYS=key1,key2 # combines with KIMI_API_KEYS
168
+ # KIMI_API_KEYS=key1,key2 # combines with MOONSHOT_API_KEYS
169
  # MINIMAX_API_KEYS=key1,key2
170
  # XIAOMI_API_KEYS=key1,key2
171
  # VOLCANO_ENGINE_API_KEYS=key1,key2