Skip to content

feat(video): Sellers announce each model's queue fields as supportedParameters - #1222

Closed
alexanderludwig wants to merge 1 commit into
mainfrom
codex/fal-frame-field-mapping
Closed

alexanderludwig wants to merge 1 commit into
mainfrom
codex/fal-frame-field-mapping

Conversation

@alexanderludwig

@alexanderludwig alexanderludwig commented Oct 15, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

To choose between image_url and start_image_url, the antseed-videos skill curled fal's OpenAPI schema directly from the buyer (first_field). Buyers should only talk to AntSeed sellers.

Design

The upstream API is kept as it is: the seller passes the body to fal unchanged, and the buyer uses fal's own field names. The seller tells the buyer what those names are.

  • Seller (@antseed/provider-fal-video):
    • Reads the schema at startup: init() fetches each allowed endpoint's public OpenAPI input schema. It sends no seller key and uses a 10s timeout.
    • Announces the field names: the endpoint's input field names go out as capabilities.supportedParameters. That field already exists: it's signed and sent through discovery.
    • Configured lists win: a service that sets supportedParameters in ANTSEED_SERVICE_CAPABILITIES_JSON keeps its own list and skips the fetch.
    • On failure: if the schema can't be read, the service is announced without the list and still starts.
    • Validation: a list that fails protocol validation (more than 32 names, or names that aren't snake_case) isn't announced.
  • Skill: reads the chosen seller's supportedParameters and picks the first-frame field (image_url / start_image_url / first_frame_url / first_image_url) and the last-frame field (end_image_url / tail_image_url / last_frame_url). It falls back to image_url / end_image_url when the seller lists none. The fal curl is removed.
  • Gateway: fal-video gets model as a baseline field. The existing check for fields a seller didn't announce now works for fal video too, without warning about the routing field.

I checked against fal's live schemas: all 100 fal image-to-video endpoints produce a valid list (the largest has 22 fields). Kling V3 announces start_image_url and end_image_url, plus its other inputs.

Venice sellers too

@antseed/provider-venice-video now does the same. init() reads GET /api/v1/models?type=video with the seller key and announces each model's queue fields:

  • Always: prompt and duration.
  • When Venice lists values: resolution and aspect_ratio.
  • When audio is configurable: audio.
  • Frames: fields for the seller's announced video.inputs. When the seller announces none, image-to-video models get image_url.

A configured supportedParameters list wins, and failures fall back to announcing nothing. All 138 Venice video models produce a valid list. The result matches what D5V1N2 already announces by hand: for ltx-2-5-fast-image-to-video that's aspect_ratio,audio,duration,image_url,prompt,resolution. The gateway treats model as a baseline field for venice-video too.

Skill

One picker reads the chosen seller's list:

  • Frame fields: picks the first- and last-frame field names.
  • Audio field: audio or generate_audio, and drops audio when the model doesn't take it.
  • Aspect ratio: drops aspect_ratio when the seller lists fields without it. That replaces the Seedance "don't send aspect_ratio" rule for sellers that announce.
  • No list: keeps the old behavior: image_url/end_image_url, the protocol's audio name, and the model notes for aspect_ratio.

Tests

  • plugins/provider-fal-video: vitest (16 tests) and tsc --noEmit pass. New tests cover:
    • reading the schema and validating it;
    • init() announcing the field names and fetching without the seller key;
    • the body being forwarded unchanged;
    • a configured list skipping the fetch;
    • the seller starting without a list when fal.ai is unreachable.
  • apps/cli: routing-parameters.test.ts passes, including a new fal-video case; tsc --noEmit passes.
  • plugins/provider-venice-video: vitest (10 tests) and tsc --noEmit pass.
  • e2e: image-video-payment-flow.test.ts passes.
  • Skill: the picker was checked in bash and zsh against fal Kling V3, fal MiniMax, Venice Seedance, Venice LTX, and old fal and Venice sellers that announce no list.

Proposed sandbox checks (not run)

  1. Seed a fal seller with fal-ai/kling-video/v3/pro/image-to-video. /v1/models/<id> should list start_image_url under supportedParameters. Run the skill with a first frame: it should send start_image_url, and the job should queue and start on that frame.
  2. Do the same with fal-ai/kling-video/v2.1/pro/image-to-video and a last frame. The skill should send tail_image_url.
  3. Use Seedance as a control: it should send image_url and end_image_url.
  4. Restart a Venice seller (for example Apex Ant). seedance-2-5-image-to-video-basic should announce audio,duration,end_image_url,image_url,prompt,resolution, and the skill should not send aspect_ratio.
  5. Start a seller with fal.ai blocked. It should still announce and serve, with no supportedParameters.

@alexanderludwig

Copy link
Copy Markdown
Collaborator Author

Follow-up review: checked frameFieldMap against all 100 fal image-to-video endpoints (live public schemas). Added first_image_url (pixverse v6 transition), and a failed schema fetch is now cached as pass-through for 60s instead of retried on every create. Unit, typecheck and e2e image-video-payment-flow pass.

@alexanderludwig
alexanderludwig force-pushed the codex/fal-frame-field-mapping branch 2 times, most recently from f19ad9c to 52deea5 Compare October 15, 2026 19:13
@alexanderludwig alexanderludwig changed the title fix(provider-fal-video): Map buyer frame fields to each fal model's field names fix(provider-fal-video): Announce each fal model's input field names Oct 15, 2026
…arameters

fal sellers read each endpoint's public OpenAPI input schema at startup and
pass the request body to fal unchanged. Venice sellers derive the fields from
Venice's video model list and their announced frame inputs. The
antseed-videos skill picks frame and audio field names and whether to send
aspect_ratio from what the chosen seller announces, so buyers never call fal
directly. Sellers that announce nothing keep the previous behavior.
@alexanderludwig
alexanderludwig force-pushed the codex/fal-frame-field-mapping branch from 52deea5 to 8a11b75 Compare October 15, 2026 19:36
@alexanderludwig alexanderludwig changed the title fix(provider-fal-video): Announce each fal model's input field names feat(video): Sellers announce each model's queue fields as supportedParameters Oct 15, 2026
@alexanderludwig

Copy link
Copy Markdown
Collaborator Author

Folded into #1201 (commit 99dbf2e): sellers announce each model's fields as supportedParameters for fal and Venice, and the antseed-videos skill shows and follows them. Closing as a duplicate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant