The Wire · Showcase
NEXT.JS TURBO LAYER GETS GARBAGE COLLECTION PLUMBING, AI PACKAGE FIXES PROVIDER USAGE DATA
By RepoJournal · Filed · About Vercel
Next.js is laying the foundation for task garbage collection across its persistence layer while fixing a critical gap in how OpenAI-compatible providers report token usage.
The Next.js team shipped three interconnected changes to turbo-tasks-backend and turbo-persistence that together enable safe deletion of stale task data from disk [1] [2] [3]. The persistence layer now supports key-value tombstones for MultiValue families [3], while the tasks layer enforces that tasks exist before access and provides `get_or_create_task` for the rare cases that need it [1]. This is groundwork for full GC support but also closes basic API gaps in the database. Separately, the AI package fixed a subtle schema validation bug where nested `prompt_tokens_details` and `completion_tokens_details` from providers were being stripped during parsing because they used strict object schemas instead of loose ones [4] [5], meaning "custom provider-specific token breakdowns were being silently discarded." On the infra side, Next.js also anchored its six async local storages to global symbols so they behave as true singletons within a realm [6]. Turborepo shipped a canary release [7] and expanded its performance agent toolbox to prioritize end-to-end workflows over isolated microbenchmarks [8], while fixing gitignore handling in Docker contexts where git metadata is absent [9].
One email a day. Unsubscribe in one click.
Keep up with Vercel in about 3 minutes a day: what actually shipped — the commits, pull requests, releases, and security advisories that matter.
One email a day. Unsubscribe in one click. Read a past issue →
Action items
- → Integrate the OpenAI usage fix into your next AI package bump to preserve provider-specific token details vercel/ai [plan]
- → Monitor turbo-persistence and turbo-tasks-backend changes as they stabilize GC foundation for your builds vercel/next.js [monitor]
- → Test async local storage fixes if you have deeply nested module paths in your Next.js app vercel/next.js [monitor]
References
- [1] turbo-tasks-backend: Enforce that tasks exist when accessing them ↗ vercel/next.js
- [2] turbo-tasks-backend: add persistence delete/tombstone plumbing for GC ↗ vercel/next.js
- [3] turbo-persistence: add key-value tombstones for MultiValue families ↗ vercel/next.js
- [4] fix(openai-compatible): preserve unmapped usage fields in usage.raw ↗ vercel/ai
- [5] fix(openai-compatible): preserve unmapped usage fields in usage.raw (#18561) vercel/ai
- [6] Anchor the async local storage instances to global symbols ↗ vercel/next.js
- [7] Turborepo v2.10.11-canary.4 ↗ vercel/turborepo
- [8] feat: Expand performance agent toolbox ↗ vercel/turborepo
- [9] fix: Respect gitignore without git metadata (#13756) vercel/turborepo