Adapter
Vercel Blob
Overview
Vercel Blob has no native bucket concept, so the adapter maps each storagesdk bucket to a pathname prefix (<bucket>/<key>). Multiple logical buckets can coexist in one Vercel Blob store; snapshots and forks land at sibling prefixes.
Configuration
import { Storage } from '@storagesdk/core';
import { vercel } from '@storagesdk/adapters/vercel';
const storage = new Storage({
adapter: vercel({
bucket: 'agent-runs',
token: process.env.BLOB_READ_WRITE_TOKEN,
}),
});
vercel({
bucket: string;
token?: string; // defaults to BLOB_READ_WRITE_TOKEN env var
access?: 'public' | 'private'; // default 'public'
});
Notes
- Peer dependency:
@vercel/blob. tokendefaults toprocess.env.BLOB_READ_WRITE_TOKEN(set automatically on Vercel runtimes); pass explicitly when running elsewhere.- Per-object
metadataonupload()is silently dropped — Vercel Blob has no user-metadata field. Use a sidecar object if you need it. minSizeonuploadUrl()is silently dropped (Vercel signed URLs cap withmaximumSizeInBytes; no lower bound).access: 'public'(the default) serves through Vercel’s CDN — brief stale reads possible. Useaccess: 'private'when snapshot/fork manifest reads need strong consistency.
Compatibility
| Capability | Support |
|---|---|
| Snapshots | Sibling prefixes inside one Blob store |
| Forks | Sibling prefixes inside one Blob store |
| Byte-range reads | ✓ |
| Multipart upload | ✗ |
| Enforced upload limits | ✓ |
| User metadata | ✗ |
| Signed URLs | ✓ |