FastAPI 0.154.0 Adds Pydantic Validation Options to Request Parameters

FastAPI·21 Oct 2026·2 min read

#fastapi

FastAPI has shipped version 0.154.0, a focused feature release that lets developers pass Pydantic validation options directly to request parameters. The change arrives as a single feature PR, #16542, authored by FastAPI creator @tiangolo, and is the headline item in this release. Rather than a broad refactor, the release narrows in on how parameters such as query strings, path segments, headers and cookies are validated, aligning them more closely with Pydantic's own configuration surface.

Concrete changes in this release:

  • Pydantic validation options on request parameters — you can now supply Pydantic validation settings through the parameter declarations themselves, instead of relying only on the defaults FastAPI applies. This is the core addition in PR #16542 by @tiangolo.
  • Consistency across parameter sources — because the options are attached at the parameter level, the same validation behaviour can be expressed for each declared parameter, reducing the need for workarounds or separate configuration paths.
  • No breaking API changes announced — the release notes frame 0.154.0 as an additive feature version, so existing applications should continue to work without modification.

For developers, the practical value is tighter control over how incoming request data is validated before it reaches route handlers. Previously, customising validation behaviour for individual parameters often meant post-processing or leaning on model-level configuration; with 0.154.0, those options live next to the parameter definition, which keeps validation rules discoverable and colocated with the route signature. Teams that share parameter patterns across many endpoints should find the resulting code easier to read and audit, and the closer tie to Pydantic means behaviour stays predictable for anyone already familiar with that library's validation semantics. As with any upgrade, pin to fastapi==0.154.0 and run your test suite to confirm parameter validation behaves as expected.

Source: https://github.com/fastapi/fastapi/releases/tag/0.154.0

Related

auto-curated · source linked above← all news