Why
src/llm.ts:106 is a single generateText call with no caching. Two consequences:
- Regenerating an unchanged range costs full price. During template or config work you re-run the same range repeatedly and pay every time.
- Partial failures may discard completed work. A multi-language or multi-release run makes several sequential model calls. If the last one fails, it needs confirming that the successful ones are not lost — that is real money and a bad CI experience.
Scope
Response cache
- Key on a hash of
(changelog + context, resolved prompt, model, provider, language, temperature) — anything that changes the output changes the key.
- Store under the existing
.ai-release-notes/ directory; add a cache directory to .gitignore.
--no-cache to bypass, and a way to clear it.
Provider prompt caching
- The system prompt, scope guard, and instructions are identical across every call in a run. Mark them as cacheable where the provider supports it (Anthropic and OpenAI both do) — this is a straight discount on multi-language and multi-release runs.
Partial-failure tolerance
- Audit the multi-call paths in
src/generator.ts and src/release-document.ts.
- A failure on call N must preserve calls 1..N-1, report exactly what succeeded, and let a re-run resume rather than restart.
Acceptance criteria
Files
src/llm.ts, src/generator.ts, src/release-document.ts, src/config.ts, docs/configuration.md
Notes
The AI SDK retries transient errors by default, so this issue is about spend and resumability, not retry logic.
Why
src/llm.ts:106is a singlegenerateTextcall with no caching. Two consequences:Scope
Response cache
(changelog + context, resolved prompt, model, provider, language, temperature)— anything that changes the output changes the key..ai-release-notes/directory; add a cache directory to.gitignore.--no-cacheto bypass, and a way to clear it.Provider prompt caching
Partial-failure tolerance
src/generator.tsandsrc/release-document.ts.Acceptance criteria
--no-cachebypasses; cache directory is gitignored and documentedFiles
src/llm.ts,src/generator.ts,src/release-document.ts,src/config.ts,docs/configuration.mdNotes
The AI SDK retries transient errors by default, so this issue is about spend and resumability, not retry logic.