An AI reviewer is a heavy API client. It reads a diff, walks to related files for context, posts comments, sets a status, and does it again on the next push. What limits how much of that it can do is the forge's own request budget, and GitLab, Azure DevOps and Bitbucket measure that budget in three different ways.
GitLab Self-Managed leaves most of those limits off until an administrator turns them on, which makes the ceiling a configuration choice. Azure DevOps Services meters consumption against shared resources and can slow a request down while still answering with HTTP 200. Bitbucket Data Center uses a token bucket per user, and on a cluster it hands out one bucket per node. When a review bot starts timing out or posting partial results, one of those three mechanisms is the first place to look.
The forge API is the reviewer's real ceiling
A reviewer's workload splits into cheap and expensive parts. Reading the diff and posting inline comments is bounded by the number of files. Building context across the repository is bounded by how many search or file requests the forge will accept, and that budget is shared with everything else the same identity does.
That split decides which limit matters. A bot that only reads the diff will rarely hit anything. A bot that tries to understand a change by pulling in related files hits the search and file endpoints, and those are the ones with the lowest ceilings on two of the three forges.
GitLab Self-Managed: most limits are off until you turn them on
The user and IP rate limits on a self-managed instance are disabled by default. When an administrator enables them under Admin > Settings > Network, the defaults are 3,600 unauthenticated API requests per hour per IP address, 7,200 authenticated API requests per hour per user, and the same 7,200 per hour for authenticated web requests. An API-specific limit, such as the one for the repository files API, supersedes the general limits for that API.
The limits that are not off by default are the ones that matter for a reviewer. The search rate limit allows 30 authenticated requests per minute and 10 unauthenticated. Cross-file context runs through search, so a bot that reads the repository to understand a change has 30 lookups a minute to spend, shared with every human searching the same instance. A few endpoints are not configurable at all: file and blob access is limited to 5 calls per minute per object per project for files over 10 MB, and expanded commit diffs to 6 requests per minute. A bot that opens large generated files hits those before it hits anything else.
Webhook setup has its own small budget, documented in webhook operations rate limits: 5 project webhook creations per minute, 10 for group webhooks, 5 for system hooks, and 5 per minute for testing or resending an event. That is separate from the webhook delivery limit, which lives in the plan limits and is disabled by default. The delivery side is a namespace-level budget rather than a per-project one, so every project and group webhook under the same top-level namespace shares it, and system hooks managed by an instance administrator are not rate limited at all. Requests over any of these return 429, and the response body is plain text that defaults to Retry later and can be replaced with a message of your own.
There is also a ban path that behaves worse than a rate limit. A failed authentication ban returns 403 for an hour after 10 failed authentication requests in a minute from one IP address. It is off by default, and once it starts, a valid credential does not clear it, because the ban is checked before the credentials are. If your instance sits behind a load balancer and you enable it, set the nginx trusted proxy addresses first, or Rack Attack will denylist the load balancer and lock out everyone behind it.
Azure DevOps Services: consumption limits and the HTTP 200 that hides a delay
Azure DevOps does not publish a requests-per-minute number. It meters resource consumption in Azure DevOps throughput units, and the global limit is 200 TSTU in any sliding five-minute window. A user's requests also get delayed when their personal consumption exceeds 200 times that of a typical user. Delays range from a few milliseconds to 30 seconds and stop within five minutes of consumption dropping. If consumption stays high, they can continue indefinitely, because the point is to protect the shared resource rather than to punish the client.
The part that breaks clients is how a delay is reported. The delayed response still returns HTTP 200, with Retry-After and X-RateLimit-Delay headers carrying the delay. A review bot that treats 2xx as success will record requests that never ran, which is a worse failure than an error, because nothing in the logs looks wrong. Only when requests are blocked does the client get a 429, with a message that names the resource and namespace. Raising the ceiling means assigning the Basic plus Test Plans access level to the identity the bot uses, which is billed for as long as it is assigned. Only that access level provides the increase, and the docs say to revert the assignment when it is no longer needed.
Pipelines participate in the same system, and each pipeline is tracked as its own entity with a 200 TSTU limit per sliding five-minute window. That matches the global per-user limit. A build agent, including a self-hosted one, generates consumption by cloning and sending logs, so moving the agent onto your own hardware does not move the consumption off the service.
Reading the headers instead of the status code
The headers are the only place the delay is visible, and most of them arrive before any delay starts, which is what makes them usable for throttling your own client rather than reacting to failures.
X-RateLimit-Limit is the total TSTUs allowed before delays begin, and X-RateLimit-Remaining is what is left. Once requests are already delayed or blocked, remaining reads 0. X-RateLimit-Reset is the Unix epoch time when tracked usage returns to zero if all consumption stops immediately. X-RateLimit-Delay carries the delay on the request itself, in seconds with millisecond precision, and it is the one header that is only sent once delays have started. X-RateLimit-Cost reports the TSTUs this specific request consumed, rounded to five decimal places, which is how you find out which call in your review flow is the expensive one. X-RateLimit-Resource names the service and threshold type that was hit, and the docs advise showing that string to a human rather than computing on it, because the values can change without notice.
TSTUs are deliberately abstract and currently dominated by Azure SQL Database DTUs, so the expensive operations are the query-shaped ones. A full-repository search costs more than reading a diff, and the same page recommends benchmarking periodically, since operations like work item queries change cost as the organization grows. When a bot's requests are delayed and it has no email address, as the build service account does not, the warning email goes to the Project Collection Administrators group instead, which is where the first signal of a throttled review bot tends to show up.
Azure Repos also enforces size limits documented separately in Git limits: repositories should stay under 250 GB, a single push is capped at 5 GB, files at 100 MB, and path length at 32,766 characters with a 4,096 character component limit enforced by a push policy that cannot be overridden. Those caps matter to a reviewer mostly as a signal about repository shape. A monorepo near the recommended ceiling of 10 GB is also a repository where any full-context review is going to be expensive, which is the same conclusion the large pull request behavior per forge points at from the other direction.
Bitbucket Data Center: one token bucket per user, per node
Bitbucket DC's rate limiting is a token bucket that targets HTTP requests using basic or bearer authentication, which covers the REST API and Git over HTTP. Git SSH is a separate mechanism. It is off until a System Admin turns it on, and when it is enabled the defaults are a bucket size of 60 and a refill rate of 5 tokens per second. A client that sends 60 requests in a burst succeeds and then waits while the bucket refills. Over the limit, the client gets HTTP 429, and every such event is recorded in the access log with the label rate-limited.
Two details change how you plan for a bot. Individual users can be given an exemption, either custom bucket settings or unlimited requests, and those exemptions are managed in the UI or through the REST API. In a cluster, each user gets a separate bucket on each node. Three nodes means three buckets at 60 tokens each, so the aggregate headroom is larger than a single-node instance while the effective limit depends on which node a request lands on. System Admins can also disable rate limiting instance-wide through the properties file.
Rate limits per forge at a glance
| Forge and edition | How the budget is measured | Default state | Threshold that matters | What the client sees |
|---|---|---|---|---|
| GitLab Self-Managed | Configurable counters per endpoint and per identity | User and IP limits disabled until an admin enables them; search and the blob limits are always on | 30 authenticated search requests per minute; 5 blob calls per minute per object over 10 MB; 6 expanded diffs per minute | 429 with a plain-text body that defaults to Retry later; a failed-authentication ban returns 403 for an hour |
| Azure DevOps Services | Consumption in TSTU, per user and per pipeline | On; 200 TSTU per sliding five-minute window | Personal usage above 200 times a typical user's | HTTP 200 with Retry-After and X-RateLimit-Delay; 429 only when requests are blocked |
| Bitbucket Data Center | Token bucket per user, and per node in a cluster | Off until a System Admin enables it | Bucket of 60 tokens, refill of 5 per second | 429, recorded as rate-limited in the access log |
What to check first when a review goes quiet
The checks are short, and they are different per forge. On Azure Repos, start with the access level on the identity the bot uses, then read X-RateLimit-Cost on the calls that build context, because a delay reported inside a 200 is invisible to a client that only logs errors. On GitLab Self-Managed, check whether anyone enabled the user and IP limits, then look at the search budget, which is on regardless and shared with every person on the instance. On Bitbucket DC, check whether rate limiting is enabled at all, whether the bot user has an exemption, and on a cluster remember that the bucket belongs to a node.
One thing to keep separate while debugging: the review tool's own plan limits are a different budget from the forge's. A tool that documents a cap on changed files per pull request is not describing the same constraint as a 30-request search budget, and hitting one tells you nothing about the other. If the bot's comments never arrive but the API calls all look successful, the forge's request budget is a better suspect than the tool's review logic.
Top comments (0)