This package generates packages/fal-nodes/src/fal-manifest.json from FAL
OpenAPI schemas.
src/configs/lists FAL endpoint IDs and local overrides.src/schema-fetcher.tsfetches schemas fromhttps://fal.ai/api/openapi/queue/openapi.json?endpoint_id=...and caches them in.codegen-cache/.src/schema-parser.tsconverts provider OpenAPI schemas to NodeTool specs.src/node-generator.tsapplies local config overrides.npm run generate:falwritespackages/fal-nodes/src/fal-manifest.json.
To add endpoints without regenerating everything, list them in src/configs/
and run npx tsx scripts/append-new-endpoints.ts, which fetches only what the
manifest is missing.
- Do not edit
packages/fal-nodes/src/fal-manifest.jsondirectly. - Provider schema interpretation belongs in
schema-parser.ts. - Endpoint-specific fixes belong in
src/configs/. - Runtime behavior for all generated FAL nodes belongs in
packages/fal-nodes/src/fal-factory.tsorfal-base.ts.
npm run generate:fal reads live schemas and live pricing, so its output is not
reproducible and nothing catches a generator change that quietly moves a node's
type, default, or enum. Fixture mode is the reproducible half:
src/fixture-generate.ts reads only the schema fixtures under fixtures/, named
by fixtures/generator-manifest.json, and writes the outputs that manifest
declares — a node-source module per fixture module, plus the manifest JSON. No
network, no pricing, no timestamps, so two runs are byte-identical.
npm run generate:fal:check generates into a temporary directory and diffs the
declared outputs against fixtures/expected/. It exits non-zero on any
difference, on a declared fixture that is absent, on a fixture whose endpoint
src/configs/ no longer carries, and when it compared nothing at all. --strict
also fails on an expected file no manifest output declares.
When a generator change is intended, refresh the expected outputs with
node scripts/provider-codegen-check.mjs --provider fal --write and commit the
diff. Adding a fixture means adding the schema under fixtures/schemas/, the
entry in the generator manifest, and the output paths it feeds.
.github/workflows/provider-codegen.yml runs the check on every diff touching
this package.
After changing FAL codegen:
npm run generate:fal
npm run generate:fal:check
npm run lint --workspace=packages/fal-codegen
npm run test --workspace=packages/fal-codegenInspect generated manifest diffs before committing.