collab: Temporarily bypass LLM rate limiting for staff (#16089)
This PR makes it so staff members will be exempt from rate limiting by the LLM service. This is just a temporary measure until we can tweak the rate-limiting heuristics. Staff members are still subject to upstream LLM provider rate limits. Release Notes: - N/A
This commit is contained in:
parent
492f6b9cdf
commit
3140d6ce8c
1 changed files with 5 additions and 0 deletions
|
@ -400,6 +400,11 @@ async fn check_usage_limit(
|
||||||
];
|
];
|
||||||
|
|
||||||
for (usage, limit, resource) in checks {
|
for (usage, limit, resource) in checks {
|
||||||
|
// Temporarily bypass rate-limiting for staff members.
|
||||||
|
if claims.is_staff {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if usage > limit {
|
if usage > limit {
|
||||||
return Err(Error::http(
|
return Err(Error::http(
|
||||||
StatusCode::TOO_MANY_REQUESTS,
|
StatusCode::TOO_MANY_REQUESTS,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue