fix: treat local rate limit queueing separately

This commit is contained in:
2026-05-12 10:34:06 +08:00
parent ddfd4f9035
commit 2a91b31d12
7 changed files with 107 additions and 26 deletions
+5
View File
@@ -45,6 +45,11 @@ func localRateLimitRetryAfter(err error) time.Duration {
return store.RateLimitRetryAfter(err)
}
func isLocalRateLimitError(err error) bool {
var limitErr *localRateLimitError
return errors.As(err, &limitErr)
}
func (s *Service) rateLimitReservations(ctx context.Context, user *auth.User, candidate store.RuntimeModelCandidate, body map[string]any) []store.RateLimitReservation {
out := make([]store.RateLimitReservation, 0)
out = append(out, reservationsFromPolicy("platform_model", candidate.PlatformModelID, effectiveRateLimitPolicy(candidate), body)...)