How does Vercel provider store data?
where does vercel provider store things? do they hardcode a redis URL or something? or is it via an environment variable? postgres? redis? what is it?
Now I have the full picture. Here's the answer:
##Vercel Provider Storage: It's a Remote API, Not Redis or Postgres
The world-vercel provider does NOT use Redis or Postgres directly. Instead, it makes HTTP API calls to Vercel's managed infrastructure.
###How it works:
-
API Endpoints: All storage operations (runs, steps, events, hooks) are HTTP requests to:
- Default (from Vercel runtime):
https://vercel-workflow.com/api - Proxy (for CLI/web):
https://api.vercel.com/v1/workflow
- Default (from Vercel runtime):
-
Authentication: Uses Vercel's OIDC token system:
const token = config?.token ?? (await getVercelOidcToken());The token is obtained via
@vercel/oidcpackage when running in Vercel's environment. -
Configuration via environment: The
APIConfigaccepts:interface APIConfig { baseUrl?: string; // Custom API URL (optional) token?: string; // Auth token (optional, auto-obtained via OIDC) headers?: RequestInit['headers']; skipProxy?: boolean; projectConfig?: { projectId?: string; // Vercel project ID teamId?: string; // Vercel team ID environment?: string; // e.g., 'production' }; } -
No hardcoded Redis/Postgres URLs: The actual database storage is managed by Vercel on their backend infrastructure. Your code just talks to their API - you don't configure or see the underlying storage.
###TL;DR
The Vercel provider is essentially an API client that talks to Vercel's managed workflow service. Vercel handles all the actual persistence (likely DynamoDB based on comments mentioning "scanning a dynamo table" in runs.ts). Authentication happens automatically via OIDC tokens when deployed on Vercel.
perfect! so the hardcoded stuff is the https://vercel-workflow.com/api part. then @vercel/oidc gives me getVercelOidcToken ?
Exactly right!
-
Hardcoded URLs in
utils.ts:const defaultUrl = 'https://vercel-workflow.com/api'; const defaultProxyUrl = 'https://api.vercel.com/v1/workflow'; -
getVercelOidcTokencomes from the@vercel/oidcpackage:import { getVercelOidcToken } from '@vercel/oidc';Used here:
const token = config?.token ?? (await getVercelOidcToken());
So when your code runs on Vercel's infrastructure, getVercelOidcToken() automatically fetches a valid authentication token for you - no API keys or secrets to manage. The token gets added as a Bearer token in the Authorization header for all API requests.
END OF POST