mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-04-08 03:00:28 -04:00
feat(copilot): set default rate limits based on observed usage data
Session: 500K tokens (P90 session usage ~550K) Weekly: 5M tokens (~10x heaviest observed weekly user)
This commit is contained in:
@@ -70,13 +70,15 @@ class ChatConfig(BaseSettings):
|
||||
description="Cache TTL in seconds for Langfuse prompt (0 to disable caching)",
|
||||
)
|
||||
|
||||
# Rate limiting — token-based limits per session and per week
|
||||
# Rate limiting — token-based limits per session and per week.
|
||||
# Defaults based on observed CoPilot usage (P90 session ~550K tokens,
|
||||
# heaviest weekly user ~600K tokens) with generous headroom.
|
||||
session_token_limit: int = Field(
|
||||
default=0,
|
||||
default=500_000,
|
||||
description="Max tokens per session (0 = unlimited)",
|
||||
)
|
||||
weekly_token_limit: int = Field(
|
||||
default=0,
|
||||
default=5_000_000,
|
||||
description="Max tokens per week (0 = unlimited)",
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user