Changelog from Diff Lab
Paste a PR diff or commit log - generateObject customer-facing bullets and internal notes.
Run this experiment yourself
Demos are not embedded on this site. Deploy a standalone copy on Vercel or run the experiment app locally.
Local development
cd apps/experiments/changelog-from-diff-lab pnpm install pnpm dev
Then open http://localhost:3010.
This is an experimental demo. Use it as a starting point for your own projects.
Changelog from Diff Lab turns a pasted PR diff or commit log into { customerFacing, internalNotes } via generateObject. Outputs are capped and treated as drafts. Missing AI keys return 503 - nothing is fabricated.
Features
- Diff - dual changelog – customer-facing + internal notes.
- Length caps – ~20k chars of input; 12 bullets per list.
- Sample commit/diff – Redis FAQ cache example.
- Honest
503when AI is unavailable.
Server Reference
POST /api/changelog
{ "diff": "commit ...\ndiff --git ..." }Success (200)
{
"customerFacing": ["Faster FAQ answers via cache"],
"internalNotes": ["Requires Upstash Redis env"],
"provider": "ai-gateway"
}| Status | Cause |
|---|---|
503 | No AI provider |
400 | Empty diff |
Implementation Details
truncateText + generateObject
Zod schema for both bullet lists.
clampChangelog
Trims and caps customerFacing / internalNotes arrays.
Use Cases
- Learn composition patterns for this lab’s stack.
- Prototype before wiring production auth and quotas.
- Deploy the standalone app as a reference implementation.
Limitations
- Demo-scale caps on input size and output counts.
- No auth / rate limits on public deploys.
- Model quality depends on input clarity.
Use in your project
Copy the Route Handler and logic.ts helpers from apps/experiments/changelog-from-diff-lab/. Wire your own persistence and auth as needed.
Deployment
Local Development
cd apps/experiments/changelog-from-diff-lab
pnpm install
pnpm devConfiguration
| Variable | Required | Purpose |
|---|---|---|
AI_GATEWAY_API_KEY | Yes (or OPENAI_API_KEY) | Preferred provider |
OPENAI_API_KEY | No | Fallback |
AI_MODEL | No | Model override |
Vercel / Next.js Features Used
- AI SDK
generateObject - Route Handlers
- Zod