Change8

FastAPI

Frontend & Mobile

FastAPI framework, high performance, easy to learn, fast to code, ready for production

Latest: 0.141.125 releases1 breaking changes4 common errorsView on GitHub

Release History

View all versions →
0.141.11 fix
Jul 29, 2026

This release fixes an issue with background tasks and headers in `app.frontend()`. Documentation for `FASTAPI_ENV` in the FastAPI CLI guide has also been updated.

0.141.01 feature
Jul 29, 2026

Introduces a new `check_dir="auto"` option for `app.frontend` to simplify local development with `fastapi dev`. This enhancement aims to improve developer convenience.

0.140.131 fix
Jul 28, 2026

This release includes a fix for `status_code` being ignored in SSE and JSONL streaming endpoints. It also contains documentation improvements for `format_sse_event` and the addition of an API reference page for `fastapi.sse`.

0.140.121 fix
Jul 28, 2026

This release fixes an issue with line splitting in `format_sse_event` to ensure compliance with the Server-Sent Events (SSE) specification.

0.140.111 fix
Jul 28, 2026

This release fixes a bug where `response_model_*` parameters were ignored for certain non-generator endpoints. The fix ensures correct behavior for endpoints returning `Iterable[...]`.

0.140.101 fix
Jul 28, 2026

This release includes a fix for handling sequences with nested Annotated types. It also contains several internal improvements related to testing and regression checks.

0.140.91 fix
Jul 28, 2026

This release includes a fix for `exclude_defaults` in `jsonable_encoder` and several internal dependency updates.

0.140.81 fix
Jul 28, 2026

This release fixes a bug where the stream item type was lost when using `include_router()`. The fix is detailed in PR #15077.

0.140.7
Jul 27, 2026

This release includes refactoring to avoid flattening dependencies for OpenAPI and internal upgrades to latest-changes. It also adds benchmarks for OpenAPI dependency.

0.140.6
Jul 27, 2026

This release refactors how dependencies are handled for request parameters, particularly for OpenAPI. This change aims to improve the management of complex parameter structures.

0.140.5
Jul 27, 2026

This release includes a refactor to avoid flattening dependencies for body fields, as detailed in PR #16071.

0.140.4
Jul 27, 2026

This release includes a refactor to skip unused dependency repeat bookkeeping, improving efficiency. The change is detailed in PR #16069.

0.140.3
Jul 27, 2026

This release includes a refactor to avoid repeated dependency flattening in OpenAPI, improving performance. The change was implemented in PR #16067.

0.140.2
Jul 27, 2026

This release includes refactoring to stop retaining flat dependency trees and the addition of a new memory benchmark for internal use.

0.140.1
Jul 27, 2026

Updated the lru_cache limit for dependencies to better handle large applications. This refactor aims to improve performance and resource management in complex app scenarios.

0.140.01 fix1 feature
Jul 24, 2026

This release focuses on documentation improvements, including adding new library skills documentation and restructuring existing pages. It also includes refactors to reduce memory usage in dependencies and internal updates to CI benchmarks and data generation scripts.

0.139.21 fix
Jul 16, 2026

This release introduces a thread-safe refactor for router route building, improving stability for parallel test execution. The change is mainly relevant for less common testing scenarios.

0.139.11 fix
Jul 16, 2026

This release includes a fix for frontend fallback support with doted paths and numerous internal updates and dependency bumps. It also features extensive translation updates across multiple languages.

0.139.01 feature
Jul 1, 2026

This release introduces the ability to pass dependencies to app.frontend() for enhanced frontend integration, alongside numerous internationalization updates and internal maintenance.

0.138.21 fix
Jun 29, 2026

This release refactors the `app.frontend()` function to return a 404 for unsupported HTTP methods when no static files match. It also includes internal updates to sponsor data handling.

0.138.1
Jun 25, 2026

This release focuses primarily on internal maintenance, including dependency updates and refactoring library skill information accessibility for agents.

0.138.01 fix1 feature
Jun 20, 2026

This release introduces the ability to serve frontend assets directly via `app.frontend()` and `router.frontend()`. It also includes numerous documentation improvements and internal maintenance updates.

0.137.21 fix1 feature
Jun 18, 2026

This release introduces the new iter_route_contexts() method for advanced routing introspection and includes numerous dependency updates and translation fixes.

0.137.12 fixes
Jun 15, 2026

This release focuses on bug fixes, specifically addressing typing checks for APIRoute and allowing empty paths in prefixless routers.

0.137.0Breaking5 features
Jun 14, 2026

This release refactors the internal handling of `APIRouter` inclusion to preserve route instances instead of cloning them, enabling new features like adding routes after inclusion. This change modifies the structure of `router.routes`, which is a breaking change for code relying on its previous list structure.

Common Errors

PydanticUserError2 reports

PydanticUserError in FastAPI often arises from incorrect type hinting involving Pydantic models, especially within dependencies or request body definitions. Resolve this by ensuring consistent and explicit type annotations: use `Annotated` correctly for dependencies with `Body()` and verify discriminated unions are properly defined and imported from `typing` instead of `collections`. Consider explicitly defining a Pydantic model schema when using complex types within request bodies.

ValidationError1 report

The "ValidationError: field required (type=value_error.missing)" error usually means your FastAPI endpoint expects a specific field in the request body, but it's missing or wasn't properly sent in the request. To fix this, ensure your request body includes all the required fields as defined in your Pydantic model associated with the endpoint, and verify that the field names match exactly. Also, check that the Content-Type header in your request is set to "application/json" if you are sending a JSON payload.

NotImplementedError1 report

NotImplementedError in FastAPI often arises when a custom type lacks explicit handling for JSON serialization or schema generation, especially when `arbitrary_types_allowed=True`. To fix this, implement `__get_validators__` and `json_encoders` within your custom type to define how it is serialized and represented in the OpenAPI schema, or use a suitable pydantic field type for serialization. Ensure that pydantic can properly understand and serialize the custom type when generating the OpenAPI schema.

RequestValidationError1 report

The "RequestValidationError" usually means your FastAPI endpoint expects data in the request body that is missing or doesn't match the expected schema. To fix this, carefully examine your pydantic model and ensure the incoming request includes all required fields with the correct data types. You can also use `Optional[]` for non-required fields in your Pydantic model.

Related Frontend & Mobile Packages

Subscribe to Updates

Get notified when new versions are released

RSS Feed