Connor Vaid
09/22/2025, 11:17 AMMarvin
09/22/2025, 11:17 AMMarvin
09/22/2025, 11:19 AMrun_deployment
in Prefect 3.x. The server enforces the deployment’s parameter schema, and run_deployment
does not expose a validate=False
style flag.
What you can do instead (depending on what you’re trying to avoid validating):
- Make your flow accept flexible parameters so the generated schema is permissive:
- Use **kwargs
(accept any keys), or
- Use a single params: dict
(accept a dict payload), or
- Remove strict type annotations/defaults that make params required or strongly typed
- After changing the flow signature, redeploy so the deployment’s parameter schema is regenerated. The schema is captured at deploy time.
Example:
from prefect import flow
from prefect.deployments import run_deployment
@flow
def my_flow(**params):
# params can contain any keys/values
print(params)
# After modifying the signature, redeploy:
# my_flow.from_source("<https://github.com/owner/repo>", entrypoint="path/to/flow.py:my_flow").deploy(name="my-deployment")
run = run_deployment(
name="my-project/my-flow/my-deployment",
parameters={"any_key": 1, "another": "x"} # now accepted by a permissive schema
)
Notes:
- Even with a permissive schema, values must still be JSON-serializable.
- Calling the REST API or client directly will not bypass validation if the deployment has a strict schema; you need to relax the flow signature and redeploy.
If you can share:
- your flow signature,
- the exact validation error, and
- whether you’re sending extra keys vs. “wrong type” values,
I can suggest the smallest change to make your deployment accept what you need.
Related docs:
- Deployments and prefect.yaml
- Server-side validation overview