Found in the first Prüfwerk round on our own repos (bp-smoketest on prod, backlog t49).
Problem
Timeout mismatch.LlmClient had a fixed 300 s total timeout; LiteLLM's request timeout is 600 s (its 408s end at exactly 600 s). On prod on 03.11., with two scans running, successful calls took 57 s at the median and 235 s at p95, and 22 calls took over 240 s. Calls past 300 s were dropped by Prüfwerk while the gateway kept generating them, which kept the model busy for the next calls.
One failed triage call counted as "model down".ask_in_chunks stopped every further try when all calls in a group failed. A scan with 10 or fewer findings sends one call per try, so a single timeout skipped the retries, including the one-by-one try for critical and high findings. On prod: factory-intake 1 and travelpwa 3 critical/high findings were left with "skipped: no answer".
Change
LLM_TIMEOUT_SECS (default 600): total time per LLM call, set via LlmClient::with_timeout. Documented in .env.example.
Triage takes the model as down only when at least two calls in flight fail at once (MODEL_DOWN_AFTER). With a model that is really down, a small scan now costs up to two more timed-out calls before the one-by-one try. A large scan still stops after the first group.
Found in the first Prüfwerk round on our own repos (bp-smoketest on prod, backlog t49).
## Problem
- **Timeout mismatch.** `LlmClient` had a fixed 300 s total timeout; LiteLLM's request timeout is 600 s (its 408s end at exactly 600 s). On prod on 03.11., with two scans running, successful calls took 57 s at the median and 235 s at p95, and 22 calls took over 240 s. Calls past 300 s were dropped by Prüfwerk while the gateway kept generating them, which kept the model busy for the next calls.
- **One failed triage call counted as "model down".** `ask_in_chunks` stopped every further try when all calls in a group failed. A scan with 10 or fewer findings sends one call per try, so a single timeout skipped the retries, including the one-by-one try for critical and high findings. On prod: factory-intake 1 and travelpwa 3 critical/high findings were left with "skipped: no answer".
## Change
- `LLM_TIMEOUT_SECS` (default 600): total time per LLM call, set via `LlmClient::with_timeout`. Documented in `.env.example`.
- Triage takes the model as down only when at least two calls in flight fail at once (`MODEL_DOWN_AFTER`). With a model that is really down, a small scan now costs up to two more timed-out calls before the one-by-one try. A large scan still stops after the first group.
## Tests
- New: `one_failed_call_still_asks_the_severe_findings_one_by_one`.
- `a_model_that_is_down_…` now uses 15 findings (two calls fail together).
- `…goes_down_midway…` expects one more call: the lone failed fifth chunk is asked once more.
- `cargo test -p compliance-agent --lib llm::` and `-p compliance-core --lib` pass; clippy for core and agent is clean.
## Deploy note
After the merge, pruefwerk-prod gets the 600 s default without any config change.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Prüfwerk gave up on every LLM call after a fixed 300 s while LiteLLM keeps a
request for 600 s: under load (two scans, median 57 s, p95 235 s per call on
prod) calls were dropped that the gateway was still working on, and the
abandoned work kept the model busy.
- LLM_TIMEOUT_SECS (default 600, the gateway's request timeout) sets the total
time per call; LlmClient::with_timeout.
- Triage takes the model as down only when at least two calls in flight fail
at once. A small scan sends one call per try, so one timeout used to skip
the retries, including the one-by-one try for critical and high findings
(prod 03.11.: 4 critical/high findings left without a verdict).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Found in the first Prüfwerk round on our own repos (bp-smoketest on prod, backlog t49).
Problem
LlmClienthad a fixed 300 s total timeout; LiteLLM's request timeout is 600 s (its 408s end at exactly 600 s). On prod on 03.11., with two scans running, successful calls took 57 s at the median and 235 s at p95, and 22 calls took over 240 s. Calls past 300 s were dropped by Prüfwerk while the gateway kept generating them, which kept the model busy for the next calls.ask_in_chunksstopped every further try when all calls in a group failed. A scan with 10 or fewer findings sends one call per try, so a single timeout skipped the retries, including the one-by-one try for critical and high findings. On prod: factory-intake 1 and travelpwa 3 critical/high findings were left with "skipped: no answer".Change
LLM_TIMEOUT_SECS(default 600): total time per LLM call, set viaLlmClient::with_timeout. Documented in.env.example.MODEL_DOWN_AFTER). With a model that is really down, a small scan now costs up to two more timed-out calls before the one-by-one try. A large scan still stops after the first group.Tests
one_failed_call_still_asks_the_severe_findings_one_by_one.a_model_that_is_down_…now uses 15 findings (two calls fail together).…goes_down_midway…expects one more call: the lone failed fifth chunk is asked once more.cargo test -p compliance-agent --lib llm::and-p compliance-core --libpass; clippy for core and agent is clean.Deploy note
After the merge, pruefwerk-prod gets the 600 s default without any config change.
🤖 Generated with Claude Code