Section summaries are capped at 600 output tokens and transcript formatting at 4,000, and the cap includes a reasoning model's thinking.
On a reasoning or hybrid model the first attempt often spends the cap thinking, comes back empty, and is sent again with double the cap.
- What to change
- Size the caps for reasoning models: raise the section-summary cap (for example to 2,000) and the formatting cap, or make the caps configurable next to the model id, so the first attempt can finish.
- Why it matters
- Each empty first attempt pays for the whole prompt and the whole cap of output, then the retry pays again. The app already logs these retries (llm_client.py:43), which is the waste this finding counts.
- How often it happens
- The code shows the problem; how often it happens is assumed. To measure it: how often finish_reason is length on the section-summary calls (max_tokens 600, line 1095) and the transcript-formatting calls (max_tokens 4000, line 328), from the provider's logs or the 'LLM 返回空内容' warnings that llm_client.py already writes
- Already reported
- Issue #52 (closed) traced empty answers from reasoning models to thinking that used up max_tokens; the fix in 7f1c619 retries an empty answer once with a doubled cap. The caps themselves stay as they were, and an answer that is cut off but not empty is not covered (see the note). https://github.com/wendy7756/AI-Video-Transcriber/issues/52
- Estimate
- about 80k output and 80k prompt tokens per 1,000 calls (estimate)
What the estimate assumes
a 30-minute talk makes about 18 calls: 7 formatting, 7 section summaries, 1 merge, about 3.5 translation; average call about 1,230 prompt and 790 output tokens; 30% of calls go to a reasoning or hybrid model (GPT-5.5 defaults to medium effort; DeepSeek hybrids); of those, half the 600-cap calls and a tenth of the 4,000-cap calls come back empty the first time