66 of 558 highlights name a project whose text the AI never saw

A long paper scroll runs along a wall and vanishes through a small window, while a typewriter in front of it writes from the short part it can see.

Wrong text summarised Reported

A nightly AI-news digest that is already lean: English first then translation, quiet repositories skipped, a health gate.

66 of 558 highlights checked over one month of Telegram and Feishu digests counted from their own output

Estimates, not measurements. Every figure on this page is an estimate from reading the code, not a measurement of the app in use.

Repository
duanyytop/agents-radar
Commit audited
7c5355e
leanprompt version
0.1.0-dev.15
Audit date
Status
The maintainers have been told about this audit; no response yet.
Maintainers
the issue
How it ran
Unattended audit: nobody was asked during the run, so priority, volume and prices were left open; the questions for the owner are listed at the end.

A nightly digest pipeline on Alibaba Model Studio that is already lean: English first then translation, skipped quiet repositories, a retry policy and a health gate written up with dated incidents. The main item is not tokens: the highlights for three reports are written from a 2,000-character head that leaves most projects out. Figures are estimates from the code.

leanprompt read the code at commit 7c5355e and found 3 places where its LLM calls could use fewer tokens, 1 more that costs no tokens today, plus 3 other problems, not scored. Static score: 99 of 100 (an estimate from the findings). The code may have changed since.

Findings

  1. LP-GE-05 Retry only retryable errors; never retry a truncation unchanged

    src/providers/openai-compatible.ts:17 · severity medium · saves prefill and generation · how often is assumed

    What happens. The OpenAI client is created with the SDK defaults, which silently retry 408, 409, 429 and every 5xx twice before callLlm sees the error. report.ts:191-196 says a 5xx must not be retried because it risks a duplicate generation that was already billed, so the SDK does exactly what the app's policy rules out, and callLlm's own 429 and connection ladders run on top of it (up to 3 x 7 = 21 HTTP attempts per call).

    The change. Pass maxRetries: 0 to new OpenAI(...) in openai-compatible.ts (and to new Anthropic() in anthropic.ts), so callLlm's ladder is the only retry layer.

    Why it helps. Each SDK retry of a 5xx resends the full prompt and, if the provider had started generating, pays for the output again.

    Estimate about 23k tokens per 1,000 calls if 2 in 1,000 calls hit a billed 5xx (estimate)

    Assumptions. 2 of 1,000 calls get a 5xx after generation started; a digest call is about 7,000 prompt and 2,200 output tokens; each SDK retry repeats both. Connection failures, the common case here, cost no tokens and are not counted.

    How often. How often DashScope returns a 5xx or 408/409 on this endpoint, from the Actions logs or the Model Studio console; a 5xx retried by the SDK leaves no line in the app's log.

  2. LP-GE-04 Stream long outputs; timeouts that match generation time

    src/providers/openai-compatible.ts:17 · severity medium · saves generation · how often is assumed

    What happens. No timeout is set, so each request may wait the SDK default of 10 minutes, and a timed-out request is retried twice by the SDK and then counted by isConnectionError (report.ts:183) as a connection failure, which callLlm retries 6 more times. One stalled request can therefore hold a concurrency slot for well over the 40-minute job limit (daily-digest.yml:63), and the job is killed before anything is committed.

    The change. Set timeout to about 3 minutes on the client (a 4,096-token qwen-flash answer takes well under a minute), together with maxRetries: 0.

    Why it helps. A request that times out after the provider generated the answer is billed and thrown away, and the run loses the whole day.

    Estimate about 4k output tokens per 1,000 calls if 1 in 1,000 calls stalls (estimate)

    Assumptions. 1 stalled call per 1,000; the stalled call is billed for a full 4,096-token answer. Observed runs take 5 to 21 minutes, so stalls have been rare or absent.

    How often. Whether any run logged an APIConnectionTimeoutError, from the Actions logs; none of the last 40 runs took longer than 21 minutes.

  3. LP-GE-05 Retry only retryable errors; never retry a truncation unchanged

    src/index.ts:628 · severity low · saves generation · how often is assumed

    What happens. attemptJson retries the highlights call when the JSON does not parse, with the same 2,048-token limit. If the parse failed because the reply was cut off at the limit, the retry is cut off the same way and both attempts are billed.

    The change. Read finish_reason in the provider, and when it is length raise the limit for the second attempt (for example to 4,096) instead of repeating it unchanged.

    Why it helps. A truncated reply sent again unchanged usually stops at the same place.

    Estimate about 2k output tokens per 1,000 calls (estimate)

    Assumptions. The English highlights reply is about 900 tokens and the translated one similar, so truncation is rare; assumed once per 1,000 calls.

    How often. How often a highlights reply is cut at 2,048 tokens; the provider returns finish_reason, which the app discards.

  4. LP-GE-07 Batch API for work that can wait

    src/report.ts:201 · severity low · saves prefill and generation · costs no tokens today

    What happens. Model Studio's Batch API bills qwen-flash at 50% of the real-time price, and this is a nightly job no user waits on. It is not recommended here: the batch window is at least 24 hours with no stated turnaround, and the run has four dependent stages (summaries, translations, comparisons, highlights) that must finish by about 07:00 CST.

    The change. No change recommended. Revisit only if the delivery time can move by a day.

    Why it helps. The same tokens at half price, about 0.25 yuan a day at the project's stated 0.5 yuan per run.

    Estimate no tokens saved; price only

    Assumptions. Batch facts from help.aliyun.com/zh/model-studio/batch-interfaces-compatible-with-openai, read 2026-11-26: qwen-flash supported in Beijing, 50% price, completion window 24h to 336h.

Other problems the audit found

Problems read in the code that cost no tokens of their own, such as a cost meter or an error path. Not scored.

  1. Telegram and Feishu highlights are extracted from only the first 2,000 characters of each report

    src/prompts-data.ts:303

    What happens. buildHighlightsPrompt sends content.slice(0, 2000) of each report. For ai-cli, ai-agents and ai-infra that is the title, the list of project links and the start of the comparison, cut mid-table, but the model is asked for 6 highlights per report. Over 2026-10-27 to 2026-11-26, 66 of 558 highlights for these three reports name a project whose text was not in the excerpt (only its link), e.g. 'ZeroClaw introduces new agent sandbox' on 2026-11-25, while the ZeroClaw section never mentions a sandbox.

    The change. For the three repo reports, build the excerpt from each project's 'Today's Highlights' paragraph (or the comparison without the link list) instead of the head of the file; keep the 2,000-character slice for the single-topic reports.

    Why it matters. The highlights are the push notification subscribers read; a claim invented from a project name is worse than no claim.

    To check. Rerun scripts/regen-highlights.ts on a past day and check that every ai-cli, ai-agents and ai-infra highlight is supported by that day's report text.

  2. A reply cut off at the output limit is published as complete

    src/providers/openai-compatible.ts:29 · LP-GE-12 Read the finish reason before using an answer · severity high

    What happens. The provider returns message.content and drops finish_reason, so a summary, comparison or translation that stopped at max_completion_tokens is published as if whole, with no line in llmStats or the step summary. A scan of the 1,444 report files committed since 2026-09-01 found no cut-off endings, so this is currently rare.

    The change. Return finish_reason with the text and log a warning (and count it in llmStats) when it is length.

    To check. A test where the fake provider returns finish_reason length shows the warning in the step summary.

  3. A failed translation publishes English text in the Chinese report

    src/report.ts:251

    Declined by the project. By design: CLAUDE.md says a partly English Chinese report still carries the day's information, and a health gate stops the run when half the calls fail. https://github.com/duanyytop/agents-radar/blob/7c5355e1bbea9c99ba251b2874ed8106329a4432/CLAUDE.md#L63

The maintainers’ response

No response from the maintainers yet.

How this was made

The llm-call-audit skill read the code and wrote findings.json; nothing was run against the project’s providers. The full audit page is what leanprompt report --html writes from the same findings.

Corrections and takedown: email info@podwarden.com or open an issue.