Pace provider traffic and identify genuine foreground bank requests

This commit is contained in:
Lars Nolden
2026-09-10 17:47:44 +02:00
parent ba3ea6ae5a
commit 4324660888
13 changed files with 817 additions and 32 deletions
+2 -1
View File
@@ -49,7 +49,8 @@ func (c *Client) rateControl() *ratelimit.Controller {
if gate := c.rate.Load(); gate != nil {
return gate
}
gate := &ratelimit.Controller{}
// Conservative 20-RPM ceiling, independent of model/provider quota claims.
gate := &ratelimit.Controller{MinimumInterval: 3 * time.Second, InitialBackoff: 15 * time.Second}
if c.rate.CompareAndSwap(nil, gate) {
return gate
}