-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.py
More file actions
15 lines (12 loc) · 773 Bytes
/
Copy pathconfig.py
File metadata and controls
15 lines (12 loc) · 773 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
"""Server configuration — shared constants."""
import os
# The single model id this bridge advertises (Copilot has no model selector).
MODEL_NAME = "copilot"
# Self-imposed rate limit (Copilot publishes none). Tune to whatever ceiling the
# probe in tests/ratelimit.py shows your account tolerates.
# RATE_LIMIT_RPM requests/minute the bridge will accept; 0 disables limiting.
# RATE_LIMIT_BURST max requests allowed back-to-back before pacing kicks in.
# Default 12 rpm sits safely below the ~15 rpm where one account starts seeing
# upstream 502s, so the limiter only bites when callers try to exceed that.
RATE_LIMIT_RPM = float(os.environ.get("RATE_LIMIT_RPM", "12")) # 12 rpm ≈ 5s per call
RATE_LIMIT_BURST = int(os.environ.get("RATE_LIMIT_BURST", "4"))