Kartik
03/15/2026, 6:12 AMMarvin
03/15/2026, 6:12 AMMarvin
03/15/2026, 6:16 AMparameter_openapi_schema (derived from your flow’s signature). If it’s empty, the UI can only “Quick run” with defaults and won’t show a dialog.
- Deploying via prefect.yaml (prefect deploy) loads your entrypoint, introspects the flow, and saves parameter_openapi_schema for you.
- Creating a deployment via client.create_deployment(...) does not compute that schema automatically. If you don’t pass it, it defaults to an empty object and the UI won’t show parameters.
How to fix (SDK)
Generate the schema from your entrypoint and pass it when creating the deployment:
from prefect.utilities.callables import parameter_schema_from_entrypoint
entrypoint = template["entrypoint"] # e.g. "flows/clickstream/clickstream.py:clickstream_dbt_run"
schema = parameter_schema_from_entrypoint(entrypoint)
deployment_id = self.client.create_deployment(
flow_id=flow_id,
name=deployment_name,
tags=tags,
parameters=parameters, # defaults shown/used by UI
description=template["description"],
entrypoint=entrypoint,
work_pool_name=WORK_POOL_NAME,
schedules=schedules,
concurrency_limit=template.get("concurrency_limit"),
parameter_openapi_schema=schema, # <-- key bit
pull_steps=[
{
"prefect.deployments.steps.git_clone": {
"repository": GIT_REPO_URI,
"branch": GIT_DEPLOYED_BRANCH_NAME,
"access_token": "{{ prefect.blocks.secret.github-pat }}",
}
}
],
# Optional: keep validation strict
enforce_parameter_schema=True,
)
A couple of UI clarifications
- Quick Run: immediately schedules a run with the deployment’s saved defaults; no prompt.
- Run (custom): opens the parameter form if (and only if) the deployment has a parameter schema.
If you’d prefer Prefect to handle all of this for you, another option is to use the high-level pattern in 3.x:
- flow.from_source(...).deploy(...) automatically computes and attaches the parameter schema, just like prefect deploy.
If you’re definitely clicking “Quick run” on both deployments and seeing a dialog for the yaml-created one, can you share a screenshot or confirm the UI button you’re using? By design, the dialog appears for the “Run” action; “Quick run” uses defaults without prompting.Kartik
03/15/2026, 6:28 AMMarvin
03/15/2026, 6:28 AMMarvin
03/15/2026, 6:29 AMfrom prefect.utilities.callables import parameter_schema_from_entrypoint
entrypoint = template["entrypoint"] # e.g. "flows/clickstream/clickstream.py:clickstream_dbt_run"
schema_obj = parameter_schema_from_entrypoint(entrypoint)
schema_dict = schema_obj.model_dump() # or `schema_obj.dict()` if you're on older Pydantic
deployment_id = self.client.create_deployment(
flow_id=flow_id,
name=deployment_name,
tags=tags,
parameters=parameters,
description=template["description"],
entrypoint=entrypoint,
work_pool_name=WORK_POOL_NAME,
schedules=schedules,
concurrency_limit=template.get("concurrency_limit"),
parameter_openapi_schema=schema_dict, # <-- must be a dict
enforce_parameter_schema=True,
pull_steps=[
{
"prefect.deployments.steps.git_clone": {
"repository": GIT_REPO_URI,
"branch": GIT_DEPLOYED_BRANCH_NAME,
"access_token": "{{ prefect.blocks.secret.github-pat }}",
}
}
],
)
Notes
- The UI shows the parameter form only if the deployment has a non-empty parameter_openapi_schema. Using the snippet above will populate it for SDK-created deployments (just like prefect deploy does from prefect.yaml).
- “Quick run” uses saved defaults without prompting; “Run” (custom) opens the parameter form. After this change, you’ll see the form for your SDK-created deployment too.
- Make sure the entrypoint module is importable where you run this code; the schema function imports your flow to inspect its signature.