This site is not affiliated with or endorsed by Vercel, Inc. Read the docs, then deploy or run each experiment yourself.
AI

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 503 when 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"
}
StatusCause
503No AI provider
400Empty 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

Deploy on Vercel

Local Development

cd apps/experiments/changelog-from-diff-lab
pnpm install
pnpm dev

Configuration

VariableRequiredPurpose
AI_GATEWAY_API_KEYYes (or OPENAI_API_KEY)Preferred provider
OPENAI_API_KEYNoFallback
AI_MODELNoModel override

Vercel / Next.js Features Used

  • AI SDK generateObject
  • Route Handlers
  • Zod

Next Steps

On this page