Craig Rose
06/25/2026, 12:35 AMMarvin
06/25/2026, 12:36 AMMarvin
06/25/2026, 12:38 AMLiteral or an Enum.
Example with `Literal`:
python
from typing import Literal
from prefect import flow
Environment = Literal["dev", "staging", "prod"]
@flow
def my_flow(environment: Environment = "dev"):
print(f"Running in {environment}")
When this flow is deployed, the environment parameter should show up in the Cloud run form as a dropdown.
If you want multiple selections, use a list of Literal values:
python
from typing import Literal
from prefect import flow
Region = Literal["us-east-1", "us-west-2", "eu-west-1"]
@flow
def my_flow(regions: list[Region] = ["us-east-1"]):
print(regions)
That should render as a multi-select dropdown.
You can also do the same with an `Enum`:
python
from enum import Enum
from prefect import flow
class Environment(str, Enum):
DEV = "dev"
STAGING = "staging"
PROD = "prod"
@flow
def my_flow(environment: Environment = Environment.DEV):
print(environment)
A few notes:
- Prefect Cloud builds the form from the flow’s parameter OpenAPI schema
- enum-style constraints are what drive the dropdown UI
- You do not need to manually configure the form in most cases
If you want nicer labels/descriptions, wrap parameters in a Pydantic model and use Field(...) metadata.
Docs:
- Form building in Prefect 3
- Deployments
If you want, I can also show you a complete deployed example using flow.from_source(...).deploy(...) or prefect deploy.Craig Rose
07/14/2026, 8:43 AMCraig Rose
07/14/2026, 8:43 AMMarvin
07/14/2026, 8:43 AMCraig Rose
07/14/2026, 8:44 AMfrom typing import Literal
from prefect import flow
Small = Literal["a","b","c"]
@flow
def test_literal(config: Small):
print(config)Marvin
07/14/2026, 8:47 AMpython
from typing import Literal
from prefect import flow
@flow
def test_flow(config: Literal["a", "b", "c"] = "a"):
print(config)
If that behaves exactly the same in Cloud Quick Run, that’s a strong repro for a UI bug.
Docs on form/schema behavior:
- Form building in Prefect 3
- Deployments
If you want, paste your exact flow signature and I can sanity-check whether there’s anything schema-related that might make Quick Run especially fragile.Craig Rose
07/14/2026, 8:49 AMfrom typing import Literal
from prefect import flow
Small = Literal["a","b","c"]
@flow
def test_literal(config: Small):
print(config)Marvin
07/14/2026, 8:49 AMMarvin
07/14/2026, 8:49 AMconfig to render as a selectable dropdown.
Your flow:
python
from typing import Literal
from prefect import flow
Small = Literal["a","b","c"]
@flow
def test_literal(config: Small):
print(config)
should produce an enum-style parameter schema for config, which is exactly the pattern Prefect uses for dropdowns.
Given your earlier report:
- Cloud Quick Run: dropdown appears but values can’t be selected/searched
- Cloud Custom Run: works
- Prefect Server Quick Run + Custom Run: both work
I do not see anything wrong with the flow definition. This strengthens the case that it’s a Prefect Cloud Quick Run UI bug.
A couple of extra notes:
- You may get slightly more stable behavior if you add a default:
python
from typing import Literal
from prefect import flow
Small = Literal["a", "b", "c"]
@flow
def test_literal(config: Small = "a"):
print(config)
But this should not be required for the dropdown to function.
- Literal[...] is the correct way to define fixed choices in Prefect 3.x forms.
So my best answer is: yes, this appears to be a bug, not misuse of the API.
If you want to report it publicly, GitHub issues would be the right place:
- Prefect issues
Useful bug report details:
- Prefect Cloud
- deployment run form in Quick Run
- Literal[...] parameter renders as dropdown but options are not clickable/searchable
- same deployment works in Custom Run
- same flow works in Prefect Server
- include your minimal repro
If you want, I can help you write a concise GitHub issue body for this exact reproduction.Craig Rose
07/14/2026, 11:28 PMMarvin
07/14/2026, 11:28 PMMarvin
07/14/2026, 11:28 PMmarkdown
## Bug summary
In Prefect Cloud, a flow parameter typed with `typing.Literal[...]` renders as a dropdown in *Quick Run*, but the dropdown options cannot be selected or searched.
The same deployment works correctly in:
- *Custom Run* in Prefect Cloud
- *Quick Run* in Prefect Server
- *Custom Run* in Prefect Server
This appears to be a Cloud-only Quick Run UI bug.
## Minimal reproduction
```python
from typing import Literal
from prefect import flow
Small = Literal["a", "b", "c"]
@flow
def test_literal(config: Small):
print(config)
## Steps to reproduce
1. Create a deployment for the flow above
2. Open the deployment in Prefect Cloud
3. Click Quick Run
4. Observe that the config parameter is rendered as a dropdown
5. Try to click or search for any of the values
## Expected behavior
The dropdown should allow selecting one of the values:
- a
- b
- c
## Actual behavior
The dropdown is rendered, but no values can be selected from it and searching does not work.
## Comparison
Behavior differs by environment/run mode:
| Environment | Quick Run | Custom Run |
|------------|-----------|------------|
| Prefect Cloud | broken | works |
| Prefect Server | works | works |
## Notes
- The flow parameter schema appears valid since the same parameter works in Custom Run
- This seems specific to the Prefect Cloud Quick Run UI
- Reproduced with a minimal Literal[...] parameter, no additional config required
```
Issue link:
- Prefect GitHub issues
If you want, I can also turn this into a shorter, more engineering-focused version.