Why garak scans hit rate limits and timeouts
A garak scan against a hosted or internal LLM endpoint can hit rate limits, lose responses or stall partway through, and the cause is usually the interaction between garak's request volume and the endpoint's limits, not a fault in the model. The REST generator is where this shows up. By default it treats HTTP 429 as a rate-limit code, supports configurable skip codes so that responses you do not want retried are passed over, and applies a 20-second request timeout to each call. Those three settings decide whether a throttled or slow request is retried, skipped or recorded as a failure, so they are the first place to look when a run degrades.
Because garak sends many prompts, each with several generations by default, a run can generate far more traffic than a team expects from a single probe. The endpoint owner sees that traffic as bursts of identical-looking requests from one client, followed by 429 responses, timeouts at the gateway or connections closed before a reply. From the endpoint side, a dropped request looks like an error or a missing response, not like a deliberate test, so the owner may not know a scan is running unless it is coordinated with them in advance. Confirm with the endpoint team which status codes their gateway returns under throttling and which timeout their load balancer enforces, because either can be shorter than garak's default.
Since garak v0.17.0, the NIM generator retries transient HTTP errors, which changes how a run behaves against NVIDIA NIM endpoints compared with the generic REST generator. If your target sits behind a different service, do not assume the same retry behavior applies. The sections that follow explain how to configure rate-limit and skip codes, set timeouts that match your endpoint, add backoff where the generator supports it, and read the evidence each dropped request leaves for the endpoint owner. Check the garak source for the REST generator against the version you have installed before you rely on any default.
Rate-limit, skip-code and timeout options and when each fits
This table compares the REST generator's rate-limit handling, skip codes, request timeout and the retry behavior of hosted generators such as NIM. Read each row as a setting, its default, and the condition under which changing it helps or hides real problems. Confirm exact configuration key names in the REST generator source before you publish a config.
| Option | Default or behavior | When to change it and the trade-off |
|---|---|---|
| Rate-limit code (HTTP 429) | Treated as a rate-limit response by default | Keep the default unless the endpoint throttles with another status. Confirm how your gateway signals throttling. |
| Skip codes | Configurable list of status codes the generator can skip | Add only codes that are known to be non-retryable. Skipping broad error codes hides failed attempts in the report. |
| Request timeout | 20 seconds by default | Raise it for slow generation models. Longer waits keep each parallel worker occupied for more time. |
| Parallel workers under timeouts | Each in-flight request holds a worker until it returns or times out | Lower parallelism when timeouts climb. Fewer concurrent requests reduce load on the endpoint owner's side. |
| NIM generator retries | Retries transient HTTP errors, added in v0.17.0 | Useful on NIM endpoints running v0.17.0 or later. Each retry is an extra request the endpoint owner will see. |
| Backoff in other hosted generators | Varies by generator, so confirm in the source | Check retry and backoff behavior for each hosted generator before relying on it. Without backoff, bursts can trigger further throttling. |
Configuring a stable REST scan step by step
This sequence takes a rate-limited REST endpoint from an agreed request budget to a verified garak configuration that can be scaled up without losing attempts silently. Each step ends with a check so that problems surface while the scan is still small.
Confirm the endpoint's limits with its owner
Before writing any configuration, ask the team that runs the endpoint for its documented rate limits, any per-key or per-IP quotas, the status code it returns when a limit is hit, and the maximum concurrency they accept from a single client. Record the answers next to the scan plan, including who to contact if the scan causes trouble. The step is done when you have a written request budget and a named contact on the endpoint side. Confirm these details with the owner rather than assuming the defaults in garak match their gateway.
Write the REST generator configuration
Create a YAML file that describes the endpoint for garak's REST generator, including the URL, request template, the response field to extract, and authentication headers loaded from an environment variable rather than typed into the file. Keep the file in version control without any secret values. The step is done when a single test prompt sent through the generator returns a readable response and the file parses without errors. If the response is not plain text or JSON in the shape you expected, fix the response extraction before going further.
Set the timeout and skip codes
Review the request timeout and the status codes that garak treats as rate limits or skips in the REST generator. The default rate-limit code is HTTP 429, and the default request timeout is 20 seconds. Compare both with the owner's documented behavior, and raise the timeout only if the endpoint legitimately takes longer for large models. Decide deliberately which codes should count as skips, because a skipped attempt is not evaluated. The step is done when the values are written into the configuration with a comment explaining each one.
Run a small probe set at low concurrency
Start with one or two probes, a low generation count, and a parallelism setting of one, so that the endpoint sees a slow and predictable request pattern. Run the scan from the host that will run the production scans, using the same credentials and network path. The step is done when the run finishes without an unexplained stop and the endpoint owner confirms that their logs show the traffic you expected. If the owner sees a spike or errors you did not plan for, stop and reduce the configuration before continuing.
Read garak.log for dropped attempts
Open garak.log, which is continued across runs, and search for rate-limit responses, timeout messages and retries that point to dropped or repeated requests. Note the count of each type and the probes they came from. The step is done when you can explain every warning in the log, or you have a recorded question for the endpoint owner or a configuration change to test. Do not treat a clean final score as proof that every request was answered, because a skipped attempt may not appear as a failure.
Check the JSONL report for skipped attempts
Open the JSONL report for the same run and compare the number of attempts recorded for each probe with the number you expected from the generation count and prompt set. Look for attempts with empty outputs, errors or skipped status, since these reduce the evidence behind any pass or fail result. The step is done when the attempt counts reconcile with the plan, or when the gap is explained by a known skip code. A gap you cannot explain means the scan is not yet ready to scale.
Scale up in measured increments
Increase the probe set, generation count or parallelism one change at a time, repeating the log and report checks after each change and keeping the endpoint owner informed of the new request rate. Stop increasing when rate-limit responses or timeouts start to appear in garak.log, and record the highest stable setting as the configuration for scheduled runs. The step is done when a full scan completes with reconciled attempt counts and the owner has agreed to the final rate. Keep the configuration file under version control so that later changes can be compared.
What dropped requests look like to the endpoint owner
From the endpoint owner's side, a garak scan that is being throttled or cut short leaves a recognizable trail. Requests rejected for rate limits appear as HTTP 429 responses in the gateway access log and in any rate-limiting metrics the gateway exports. Requests that garak abandons when its 20-second request timeout expires usually appear differently: the server may still be working on a generation that garak has already given up on, so the log shows a long-running request that ends in a client disconnect or never records a normal completion. Skip codes you configure in the REST generator are a client-side decision, so they produce no request-side error at all, only a gap between the prompts you expected and the requests that arrived. Ask the endpoint owner which of these signals their gateway actually records, since some proxies log disconnects and others do not.
garak's own logs tell a different story. The garak.log file records the errors and status codes garak saw, and the JSONL report records each attempt and its evaluation, but neither proves what the server did with a request that timed out. A single failed attempt in garak can therefore correspond to a 429 the server returned, a connection the server closed, or a response that arrived after garak stopped waiting. Compare the two sides by timestamp and by the prompt or session identifier if your endpoint logs one. Treat garak's view as the client's view and the gateway's view as the authority on what was served and billed.
Retries are where the load question gets sharp. Each retry is a new request to the endpoint, so a scan that backs off and retries a throttled prompt can add traffic on top of the planned volume, and a timed-out generation may still consume capacity on the server. Before the scan starts, agree with the endpoint owner on a maximum request rate, the number of concurrent connections, and whether retries count against that budget. Ask them what happens at the gateway when the limit is exceeded and whether a shared quota is in use by other applications. Confirm the same numbers in the garak configuration you run, because the rate you agreed and the rate the scan produces are not always the same thing.
Security and operational considerations for throttled scans
Throttled scans put the most pressure on the people and data around them: the credentials used to reach the endpoint, the harmful prompts sent during retries, and the reports and logs left behind. Each card below names one of these concerns and what to check before the first scan runs against a shared or production endpoint.
Keep credentials out of YAML and logs
REST generator configurations often carry an API key or bearer token in a header or environment reference. Keep the secret in an environment variable or a secrets store, reference it from the configuration, and never commit a populated file to a repository. Check that verbose logging and copied example commands do not echo the header value, and rotate any key that appeared in a shared log or ticket.
Limit retries of harmful prompts
A retry after a 429 or timeout re-sends the same attack prompt, so a throttled run can deliver the same harmful content several times to the endpoint and its logs. Keep the attempt count modest, lower generation counts for probes that are already known to fail, and review the retry behavior of any hosted generator before a long run. Confirm with the endpoint owner how their own logs treat repeated prompts.
Agree scan windows with the endpoint owner
Rate limits are usually shared across users, so a scan at a busy hour can degrade service for real customers or trip automated blocking that the scanning team did not expect. Agree a window, a maximum request rate and a stop contact in writing before the run. Ask the owner whether skipped or rate-limited responses should be treated as expected during the window.
Monitor garak.log across runs
garak.log is continued across runs, so timeouts, skipped requests and retry messages from earlier scans remain in the same file. Watch for a rising count of timeouts or repeated 429 responses between runs, because it can signal a changed endpoint or a misconfigured limit. Define who reviews the log, how long it is kept and which entries should trigger a stop.
Retain reports containing harmful outputs
The JSONL report records each attempt and its evaluation, which can include the full prompt and the model's harmful response. Treat it as sensitive data: restrict access, set a retention period agreed with the data owner, and keep it out of shared CI artifacts unless access is controlled. Confirm the storage location and deletion process before the first scan, not after reports have spread.
Questions teams ask about garak rate limits and timeouts
How much effort does tuning garak rate limits and timeouts take?
The effort depends mostly on how the target endpoint responds under load, not on garak itself. A stable local model with no quotas usually needs little tuning, while a hosted or shared endpoint with per-minute quotas, variable latency or a gateway in front of it needs several test runs to find settings that complete without dropped requests. The main drivers are the endpoint's quota policy, how many requests the probe selection produces, typical response times for long generations, and how many parallel attempts the team wants. Ask the endpoint owner for their published limits before planning, and budget a short pilot run with reduced probes to observe 429 responses and timeouts first.
Can our own team tune rate limits and timeouts without outside help?
Yes, in most cases. The REST generator is configured with a short YAML file, and the settings that matter are the rate-limit code, the skip codes, and the request timeout. garak treats HTTP 429 as a rate-limit code by default and uses a 20-second request timeout by default, so a team can start there and change values after reviewing the log. Outside help becomes useful when the target sits behind several layers such as a gateway, a load balancer and a model server, when the endpoint has custom error payloads, or when the scan must run on a fixed schedule with evidence for an audit. DeployOpen can scope that work as a fixed-scope engagement if your team prefers a partner.
What do we need from the endpoint owner before a scan starts?
The endpoint owner controls the limits that decide whether a scan completes, so their input comes first. Ask for the request-per-minute and concurrency limits that apply to the scan identity, the status codes the gateway returns when a quota is exceeded, typical and worst-case response times for long generations, and whether the gateway logs rejected requests. Agree a test window and a contact who can raise or lower the limit during the run. Confirm which HTTP codes count as skips rather than failures, because a code that the owner treats as a server fault may need to be listed as a skip code in the generator config.
How do timeouts interact with parallel attempts?
Timeouts and parallelism multiply each other. Each parallel attempt holds an open request until the endpoint answers or the timeout expires, so more workers means more simultaneous requests reaching the endpoint. If the endpoint slows under that load, responses take longer, more requests hit the 20-second default timeout, and the timed-out attempts are dropped from the scan. Lowering parallelism is often the first fix. Raising the timeout helps only when the endpoint is slow but healthy, because a larger value also keeps stuck connections open longer. Test the two settings together on a small probe set before a full run.
What does a dropped request look like to the endpoint owner?
To the endpoint owner, a dropped request appears as a normal inbound call that ended in a rate-limit response, a gateway timeout, or a connection closed by the client before the model returned. Patterns to expect include bursts of 429 responses during the first minutes of a run, clusters of requests that never receive a completed response, and repeated identical prompts after a timeout if the scan retries. Owners who log by client identity can see the scan source address and the request rate. Share the scan window and the expected request profile in advance so that the traffic is not mistaken for abuse or a denial-of-service event.
Do retries change garak scan results?
They can. A retried request that eventually returns a response is evaluated like any other attempt, so the result reflects the answer the model gave on the retry, not the first call. garak v0.17.0 made the NIM generator retry transient HTTP errors, which is one reason to check the release notes for the version you run. For the REST generator, a request skipped because of a skip code or a rate-limit response does not produce an evaluated output, so the attempt count in the report can differ from the planned count. Record the garak version, the generator config, and the number of skipped or retried attempts with each run so that a later comparison explains any change in scores.
How do we keep rate-limit handling consistent across scheduled scans?
Keep the generator config, the garak version and the probe selection under version control, and review them whenever the endpoint or its quotas change. Scheduled runs break most often after a gateway policy changes, after a model is replaced, or after a garak upgrade changes default behavior. Log the number of 429 responses, skipped attempts and timeouts for every run, and treat a sudden rise as a signal to check the endpoint before reading the scores. Agree with the endpoint owner which runs may use the higher limit and which must stay within the standard quota.
How a garak request flows through rate-limit and timeout handling
The flow starts when garak's probewise harness sends an attempt to the REST generator, which makes an HTTP request with a 20-second timeout by default. The endpoint's response branches three ways: a 429 is treated as a rate-limit code, a status code listed in the configured skip codes is skipped, and a request that exceeds the timeout is dropped. Each outcome is written to the JSONL report and garak.log on the scan host, while the endpoint owner sees only the requests and their status codes on their side of the trust boundary. Check that your skip codes and timeout match what the endpoint actually returns.
Branches a garak attempt takes at a rate-limited REST endpoint.
Scaling concurrency without flooding a throttled endpoint
Concurrency is the setting most likely to turn a rate limit into a timeout. Every parallel attempt is an additional request in flight against the endpoint, and the endpoint's rate limiter counts those requests whether or not your scan is waiting on them. When the endpoint starts answering with HTTP 429 at a steady request rate, adding workers does not raise your throughput. It adds more requests that are rejected, retried or left waiting, and the 20-second request timeout that garak's REST generator uses by default (the default is documented in the garak source for the REST generator) then starts expiring on requests that the endpoint is still processing. A timeout after a rate limit is a sign of too much concurrency, not of a broken endpoint.
Before raising parallelism, confirm three things with the team that runs the target: the requests per second or concurrent connections their gateway allows per client key, whether limits are applied per key, per IP or per tenant, and how long a rejected request is held before it is dropped. Then measure. Run a short probe set at your current setting, count the 429 and timeout responses in garak.log and in the endpoint's own access logs, and only increase concurrency while both counts stay flat. The parallelism settings themselves are covered in Running garak with parallel attempts, so this section is about the decision rule, not the configuration keys.
Throttling and timeouts also multiply each other across a scan. A worker that waits out a 429 holds a connection slot, so the effective concurrency drops while the number of queued attempts stays the same, and the endpoint sees bursts when waiting workers release together. If the endpoint is shared with production users, a scan that is well inside the agreed rate can still degrade their latency. Agree a ceiling with the endpoint owner in writing, set garak to stay below it with headroom, and treat any run that produces a rising count of skipped or timed-out attempts as a signal to lower concurrency rather than to extend the timeout.
How hosted generators and the REST generator differ on retries
The REST generator connects garak to any HTTP endpoint that returns plaintext or JSON, and it is configured through a short YAML file. By default it treats HTTP 429 as a rate-limit code, so garak recognizes a throttled response as a rate-limit event rather than an ordinary failure. It also accepts a list of skip codes, which tells garak to move past a response it cannot use and continue with the next attempt. Its default request timeout is 20 seconds, so a slow model or a busy gateway can time out before it returns an answer.
- Rate-limit code: Confirm that your endpoint returns 429 for throttling. If it returns a different status, such as 503 from a gateway, garak will not treat it as a rate-limit event by default.
- Skip codes: Decide which non-success codes should be skipped, such as a content-filter response, and list them explicitly so they do not stop the run.
- Timeout: Measure your endpoint's typical latency for long completions and set the request timeout above that, instead of relying on the 20-second default.
- Backoff: Confirm how garak and your gateway space retries, since a short timeout combined with parallel attempts can multiply load on a fragile endpoint.
- Gateway behavior: Ask the endpoint owner whether a proxy or API gateway in front of the model applies its own rate limits and returns codes that garak does not expect.
Check that a test scan against a small probe set produces the status codes and timeouts you expect before running the full configuration.
The NIM generator is garak's generator for NVIDIA NIM endpoints. Since garak v0.17.0, it retries transient HTTP errors, which reduces the number of attempts lost to brief server-side failures. Retries are handled by the generator, so you do not need to write retry logic in your configuration for the errors it covers. Retries do not fix a sustained rate limit or a misconfigured endpoint, so you still need to size the scan to what the endpoint can serve.
- Version check: Use garak v0.17.0 or later if you rely on the NIM generator's retry behavior, and confirm the version in your scan environment.
- Scope of retries: Read the release notes to see which transient errors are retried, rather than assuming every failure is retried.
- Request volume: Set parallelism so that retries do not push a shared NIM deployment past its capacity.
- Logging: Check garak.log after a run to see how often retries occurred, since frequent retries signal a capacity problem.
- Ownership: Agree with the team that runs the NIM deployment on acceptable request rates before scanning.
Review the release notes for your garak version and confirm the retry scope before you plan timeouts around it.
garak supports many generators, including Hugging Face Hub models, Replicate, OpenAI API models, AWS Bedrock, LiteLLM and llama.cpp. The public README does not describe how each of these handles rate limits, retries or timeouts, so you should not assume that one generator's behavior applies to another. Retry behavior can depend on the generator, the provider SDK it uses and the garak version. Confirm the behavior in the generator's source file for the version you run, and in the provider's documentation for rate-limit responses.
- Source check: Open the generator file for your version in the garak repository and look for retry, backoff and timeout handling.
- Provider limits: Confirm the request and token limits for your account or deployment, since these set the ceiling for a scan.
- Client-side throttling: Decide whether you need to limit parallel attempts yourself if the generator does not.
- Error visibility: Check that rate-limit errors appear in garak.log, so failed attempts are not mistaken for clean results.
- Test run: Run a short scan and count retries and failed attempts before scaling up.
Where the source does not answer the question, ask the generator maintainers or test the behavior against a controlled endpoint.
How DeployOpen scopes and supports garak scan stability work
A garak scan is only as stable as the endpoint it targets and the settings that govern retries, timeouts and request pacing. The work below turns those settings into a written, tested configuration that the endpoint owner has agreed to, and that your team can run and maintain without guesswork.
Written scope before any work
The scope names the target endpoints, the garak version in use, the probe set, and who owns each endpoint. It also records which failures count as findings and which count as infrastructure problems. Agreeing this in writing before testing starts keeps rate-limit behavior from being mistaken for a model weakness. Ask for the scope to list each rate-limited or skipped response you expect to see.
Endpoint and rate-limit discovery
Before tuning anything, we work with the endpoint owner to learn the real request ceiling, how the gateway signals throttling, and whether it returns HTTP 429 or another code. We check which responses should be skipped rather than retried, and what the typical latency is for long generations. Confirm these values with the owner, because a guess about limits is the most common reason scans stall.
Configuration and timeout tuning
We write the REST generator configuration with the observed rate-limit code, the skip codes, and a request timeout that fits the endpoint's latency. Where the hosted generator supports retries, we set backoff so that retries spread out instead of stacking up. Each setting is recorded with its reason so a later change can be traced back to a specific observation.
Verification runs with the owner
We run short verification scans that deliberately trigger throttling and timeouts, then read the garak.log and JSONL report to confirm which attempts were retried, skipped or dropped. The endpoint owner reviews their own access logs against those timestamps. This step proves the configuration behaves as written before a full scan is scheduled.
Handover of configs and runbooks
You receive the generator configuration files, a runbook describing how to read dropped-request patterns, and the steps for escalating to the endpoint owner. The runbook explains what a dropped request looks like on the endpoint side so that operators do not misread it as an attack or a model fault. Your team keeps the configs under version control.
Optional retainer for upgrades
A retainer covers re-checking rate-limit settings after endpoint changes and after garak upgrades, since new releases can change generator behavior. Terms, scope and response expectations are set in a written agreement. Ask for the retainer scope and what triggers a retest before you sign.

