Skip to content

generatePrompt omits props from Remotion schema, causing prop name mismatches at runtime #224

@kenzic

Description

@kenzic

Summary

The Remotion schema defines props on composition entries (see schema.ts#L184), but generatePrompt does not include those props in its output (schema.ts#L55–56). As a result, the model has no knowledge of the expected prop shape when generating JSON, and passes mismatched or missing prop names to components at runtime.

Expected behavior

generatePrompt should reflect the full schema available to the model, including props for each composition. If a composition accepts typed props, the prompt should describe them so the model can produce valid, matching output.

Actual behavior

props is defined in the schema but excluded from the generated prompt. The model generates prop names without any grounding in the actual component API, which causes runtime failures when those props are passed to Remotion components.

Reproduction

  1. Define a Remotion composition with typed props in your registry
  2. Call generatePrompt and inspect the output
  3. Note that props are absent from the prompt
  4. Use the prompt to generate a scene -- observe that prop names in the output do not match the component's expected interface

Question

Is this intentional? If props are meant to be opaque to the model (e.g. for security or flexibility reasons), that should be documented. If it's an oversight, the fix is straightforward: include props in the prompt output alongside the rest of the composition schema.

Context

Using json-render with Remotion in a Next.js app. The prop mismatch breaks component rendering silently -- no schema validation error, just wrong or missing values passed through.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions