Short answer: yes, in this specific case it’s an expected incompatibility — and the fix is to align your flow runtime to the same Prefect version as your server/worker.
What changed
- In 3.6.20 we adjusted how the client sends JSON to the API (moving to httpx’s json= dict style to ensure proper Content-Type) to match newer FastAPI behavior. See
PR #20822.
- With a 3.6.20 server and a 3.6.17 client, POSTs to /api/task_runs/ can be parsed as a raw string instead of a JSON object, leading to 422 "Input should be a valid dictionary or object to extract fields from." That matches the error you’re seeing.
Compatibility guidance
- We recommend keeping server/worker and flow environments on the same Prefect version for best results.
- Minor releases can include dependency bumps (e.g., FastAPI) that change request parsing. That can make newer servers stricter than older clients.
- Prefect docs on version alignment:
https://docs.prefect.io/v3/how-to-guides/cloud/troubleshoot-cloud
How to resolve
- Recommended: upgrade your flow environment to prefect==3.6.20 to match your server/worker.
- If you’re using containers, switch your image to a 3.6.20 tag (e.g., prefecthq/prefect:3.6.20-<python>).
- If you’re using a virtualenv, pip install --upgrade "prefect==3.6.20".
- Temporary alternative: roll back server/worker to 3.6.17 until you can update the flow runtime.
Release notes for reference:
Prefect 3.6.20
If you share how your flows are packaged/executed (Docker, Kubernetes, or process worker) I can give you exact steps to align the versions.