unstale

pypi / fastapi

fastapi

What changed in fastapi 0.119 to 0.165, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-30.

32 breaking1 security5 deprecations32 new APIs and options2 performance11 behavior and defaults2 tooling79 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli on npm

fastapi 0.1651 changes

New APIs and options 1

  • Form parsing limits are now configurable, allowing developers to adjust limits for form parsing.

    0.165.0release notes

fastapi 0.1641 changes

New APIs and options 1

  • Request body size limits are configurable, allowing developers to limit incoming request bodies.

    0.164.0release notes

fastapi 0.1632 changes

New APIs and options 1

  • Add dependency concurrency limits with the max_concurrency parameter.

    0.163.0release notes

Fixes and other changes 1

  • Fixes OpenAPI generation for response models with nested computed fields.

    0.163.1release notes

fastapi 0.1628 changes

Breaking changes 3

  • Support for Python 3.10 was dropped.

    0.162.6release notes

  • FastAPI now requires AnyIO 4.1.0 or newer at runtime.

    0.162.4release notes

  • Omitted boolean form fields now use declared defaults or produce missing-field errors instead of being inferred as False; unset model fields stay excluded from model_dump(exclude_unset=True), and defaults do not count as submitted fields during union selection.

    0.162.0release notes

Tooling 2

Fixes and other changes 3

  • Fixes cleanup of async yield dependencies when cancellation occurs.

    0.162.7release notes

  • Fixes synchronous dependency cleanup when cancellation occurs.

    0.162.5release notes

  • FastAPI adds support for Python 3.15.

    0.162.3release notes

fastapi 0.1612 changes

New APIs and options 1

  • FastAPI now supports combining unions of form models.

    0.161.0release notes

Fixes and other changes 1

  • Fixes OpenAPI schemas for standalone nullable form unions.

    0.161.1release notes

fastapi 0.1601 changes

Breaking changes 1

  • Parameter models now apply their extra configuration to all submitted fields in the same parameter location, including sibling fields declared elsewhere.

    0.160.0release notes

fastapi 0.1594 changes

New APIs and options 4

  • Form models can now use optional unions.

    0.159.1release notes

  • Cookie parameters can now use optional parameter models.

    0.159.0release notes

  • Header parameters can now use optional parameter models.

    0.159.0release notes

  • Query parameters can now use optional parameter models.

    0.159.0release notes

fastapi 0.1583 changes

New APIs and options 2

Fixes and other changes 1

fastapi 0.1571 changes

New APIs and options 1

  • Query, header, and cookie parameter models can now be combined.

    0.157.0release notes

fastapi 0.15610 changes

Fixes and other changes 10

  • Converting an uploaded file to bytes now preserves its position.

    0.156.8release notes

  • Fixes validation error locations for form and file AliasChoices.

    0.156.7release notes

  • Query, header, and cookie parameters now respect model alias settings.

    0.156.6release notes

  • Fixed AliasChoices for path parameters.

    0.156.5release notes

  • Fixes AliasChoices handling for named JSON body parameters.

    0.156.4release notes

  • Fixes AliasChoices extraction for form models.

    0.156.4release notes

  • Fixed AliasChoices for query parameters, headers, and cookies.

    0.156.3release notes

  • Preserves Pydantic field metadata in inferred request parameters.

    0.156.2release notes

  • Preserves Pydantic field metadata when request options are omitted.

    0.156.1release notes

  • Preserves Pydantic Field attributes in request parameters.

    0.156.0release notes

fastapi 0.1551 changes

Breaking changes 1

  • Removed deprecated **extra keyword arguments from Path, Query, Header, Cookie, Body, Form, and File; unknown keyword arguments now raise TypeError. Use json_schema_extra for additional JSON Schema properties.

    0.155.0release notes

fastapi 0.1541 changes

New APIs and options 1

  • Adds Pydantic validation options to request parameters.

    0.154.0release notes

fastapi 0.1531 changes

Breaking changes 1

  • Unions of form models now use browser form handling: empty scalar fields use defaults or produce missing-field errors, empty list items are preserved, omitted booleans become False, and unselected files are treated as missing. JSON request bodies are unchanged.

    0.153.0release notes

fastapi 0.1521 changes

Behavior and default changes 1

  • Validation errors for header parameter models now report HTTP header names instead of Python field names; explicit aliases and the documented settings retain their existing behavior.

    0.152.0release notes

fastapi 0.1511 changes

Breaking changes 1

  • Explicit null is validated as None rather than treated as omission; defaults apply only when a value is omitted, and null for an expected JSON object body returns a validation error.

    0.151.0release notes

fastapi 0.1501 changes

Breaking changes 1

  • Unselected browser file inputs are treated as missing: required file fields return a validation error, defaults are used, and unselected inputs are ignored in file lists.

    0.150.0release notes

fastapi 0.1491 changes

Breaking changes 1

  • Empty scalar values in form models are treated as missing. Required fields return a validation error; defaults and default factories apply, and fields remain unset in model_dump(exclude_unset=True). Empty strings in lists, omitted boolean fields, JSON requests, and direct Pydantic validation…

    0.149.0release notes

fastapi 0.1485 changes

Breaking changes 3

  • For parameter models, applying a default no longer marks a field as explicitly set, so model_dump(exclude_unset=True) excludes it.

    0.148.0release notes

  • Defaults for omitted Query, Header, Cookie, and Form parameters and model fields are no longer treated as user input or validated by default. Enable validate_default=True when omitted values should be validated.

    0.148.0release notes

  • Validation errors no longer include injected defaults in input.

    0.148.0release notes

Fixes and other changes 2

  • Body(validate_default=True) is now honored, allowing validation of default values.

    0.148.0release notes

  • Default factories run once.

    0.148.0release notes

fastapi 0.1471 changes

Breaking changes 1

  • Omitted bool and bool | None form fields are interpreted as False, including required fields and fields defaulting to True or None; the inferred value counts as explicitly set.

    0.147.0release notes

fastapi 0.1461 changes

Deprecations 1

  • The root_path parameter is deprecated; configure the server with fastapi run --root-path /api/v1 instead.

    0.146.0release notes

fastapi 0.1452 changes

Breaking changes 2

  • The unused **extra parameter was removed from FastAPI.

    0.145.0release notes

  • The deprecated openapi_prefix parameter was removed from FastAPI.

    0.145.0release notes

fastapi 0.1441 changes

New APIs and options 1

  • Security dependencies can now be used with WebSocket endpoints.

    0.144.0release notes

fastapi 0.1437 changes

Breaking changes 2

  • Set this environment variable to true to retain automatic OpenTelemetry exporter setup from OTEL_* environment variables.

    0.143.0release notes

  • Set auto_configure to true in the FastAPI telemetry configuration to retain automatic OpenTelemetry exporter setup.

    0.143.0release notes

New APIs and options 1

Fixes and other changes 4

  • Fixes handling of an empty value for the byte file list parameter.

    0.143.5release notes

  • Fixes serialization of non-finite floats in JSONL and SSE streams.

    0.143.3release notes

  • Fixes blocking frontend fallback file checks.

    0.143.2release notes

  • Fixes included route metadata in iter_route_contexts().

    0.143.1release notes

fastapi 0.1425 changes

New APIs and options 1

Fixes and other changes 4

  • FastAPI telemetry is isolated for excluded requests.

    0.142.4release notes

  • Cache OpenTelemetry tracers to preserve warning deduplication.

    0.142.3release notes

  • Startup is allowed to continue when automatic OpenTelemetry configuration fails.

    0.142.2release notes

  • Fixes repeated endpoint wrapping in included routers.

    0.142.1release notes

fastapi 0.1412 changes

New APIs and options 1

  • Adds app.frontend with check_dir="auto" to make local development more convenient with fastapi dev.

    0.141.0release notes

Fixes and other changes 1

  • Fix support for background tasks and headers from dependencies in app.frontend().

    0.141.1release notes

fastapi 0.1407 changes

Performance 1

  • Reduced memory usage in dependencies, which may lower FastAPI’s runtime memory consumption.

    0.140.0release notes

Fixes and other changes 6

  • Fixes status_code being ignored for SSE and JSONL streaming endpoints.

    0.140.13release notes

  • Fixes line splitting to comply with the SSE spec.

    0.140.12release notes

  • Fixes response_model_* parameters being ignored for non-generator endpoints with Iterable return types.

    0.140.11release notes

  • Fix handling sequences with nested Annotated types.

    0.140.10release notes

  • Fixes exclude_defaults not being propagated to dictionary keys and values during encoding.

    0.140.9release notes

  • Fixes the stream item type being lost when using include_router().

    0.140.8release notes

fastapi 0.1393 changes

New APIs and options 1

  • app.frontend() now supports dependencies, for example to enable automatic cookie authentication for the frontend.

    0.139.0release notes

Fixes and other changes 2

  • Router route building is thread-safe, mainly benefiting tests running in parallel threads.

    0.139.2release notes

  • Frontend fallback now supports dotted paths such as /users/john.doe.

    0.139.1release notes

fastapi 0.1383 changes

Breaking changes 1

  • Returns 404 for methods other than GET or HEAD when there are no static file matches.

    0.138.2release notes

New APIs and options 2

  • Adds support for serving a frontend from a directory using app.frontend, allowing developers to configure the frontend at a path such as /.

    0.138.0release notes

  • Adds support for serving a frontend from a directory using router.frontend, allowing developers to configure the frontend at a path such as /.

    0.138.0release notes

fastapi 0.1378 changes

Breaking changes 1

  • router.routes can now contain intermediate objects forming a tree, not just APIRoute objects; treat it as an internal implementation detail rather than iterating or modifying it as a flat list.

    0.137.0release notes

New APIs and options 3

  • Adds iter_route_contexts() for advanced use cases that previously used router.routes.

    0.137.2release notes

  • APIRouter adds an experimental handle method, allowing a router to customize how it handles requests.

    0.137.0release notes

  • APIRouter adds an experimental matches method, allowing a router to customize how it matches requests, such as matching on a specific header.

    0.137.0release notes

Behavior and default changes 2

  • APIRouter instances are preserved when included instead of having their routes copied, enabling router customization and saving memory in some cases.

    0.137.0release notes

  • Included routers and routes are no longer copied, so routes added after inclusion are reflected, and a subrouter can be included before its routes are added.

    0.137.0release notes

Fixes and other changes 2

  • Typing checks for APIRoute are fixed.

    0.137.1release notes

  • Path operations in a prefixless router now allow an empty path.

    0.137.1release notes

fastapi 0.1363 changes

Breaking changes 1

  • With the default convert_underscores=True, underscore headers are no longer accepted.

    0.136.3release notes

Fixes and other changes 2

  • Server Sent Event fields are validated to prevent applications from sending broken data.

    0.136.2release notes

  • FastAPI supports free-threaded Python 3.14t.

    0.136.0release notes

fastapi 0.1359 changes

Breaking changes 2

  • The April Fool's @app.vibe() decorator was removed.

    0.135.4release notes

  • The minimum supported Pydantic version is now 2.9.0, affecting which versions can be installed with FastAPI.

    0.135.2release notes

New APIs and options 5

  • Adds support for the @app.vibe() decorator.

    0.135.3release notes

  • Use EventSourceResponse as a path operation's response_class to stream Server-Sent Events.

    0.135.0release notes

  • FastAPI supports streaming SSE from async or regular generator path operations; yielded items are JSON-encoded, and declared return types enable Pydantic validation, documentation, and serialization.

    0.135.0release notes

  • FastAPI adds support for Server-Sent Events (SSE).

    0.135.0release notes

  • Yield ServerSentEvent objects to set SSE fields such as data, event, id, retry, comment, or raw_data.

    0.135.0release notes

Behavior and default changes 1

  • SSE streams send a keep-alive ping comment every 15 seconds without a message and set headers to prevent caching and proxy buffering.

    0.135.0release notes

Fixes and other changes 1

  • Avoids yielding from a TaskGroup; it is used only as an async context manager and closed in the request async exit stack.

    0.135.1release notes

fastapi 0.1341 changes

New APIs and options 1

  • Endpoints can stream JSON Lines and binary data with yield.

    0.134.0release notes

fastapi 0.1332 changes

New APIs and options 1

  • Adds a FastAPI Agent Skill for use with library agent skills.

    0.133.1release notes

Behavior and default changes 1

  • FastAPI now supports Starlette 1.0.0 and later.

    0.133.0release notes

fastapi 0.1321 changes

Breaking changes 1

  • FastAPI now rejects JSON requests without a valid JSON Content-Type header by default; set strict_content_type=False to disable the check.

    0.132.0release notes

fastapi 0.1312 changes

Deprecations 2

fastapi 0.1301 changes

Performance 1

  • JSON responses are serialized with Pydantic in Rust when there is a Pydantic return type or response model, resulting in a 2x or greater performance increase.

    0.130.0release notes

fastapi 0.1293 changes

Breaking changes 2

  • Support for fastapi-slim is dropped and no further versions will be released; use fastapi[standard] or fastapi instead.

    0.129.2release notes

  • FastAPI no longer supports Python 3.9, so developers must use a supported Python version.

    0.129.0release notes

Fixes and other changes 1

  • The JSON Schema for bytes uses contentMediaType: application/octet-stream instead of format: binary.

    0.129.1release notes

fastapi 0.12816 changes

Breaking changes 1

Deprecations 1

  • fastapi-slim is deprecated; its build setup is changed so it only depends on fastapi.

    0.128.8release notes

New APIs and options 1

Behavior and default changes 3

  • HTTPException.headers now uses Mapping instead of dict, allowing mappings as header values.

    0.128.7release notes

  • Response type hints can now be used as dependency annotations.

    0.128.2release notes

  • Updates the ValidationError schema to include input and ctx.

    0.128.1release notes

Fixes and other changes 10

  • Attempting to include a router into itself now produces a clear error.

    0.128.7release notes

  • Fixes the on_shutdown parameter of APIRouter.

    0.128.6release notes

  • Fixes the on_startup parameter of APIRouter.

    0.128.6release notes

  • Re-implemented for compatibility with the next Starlette while keeping backwards compatibility.

    0.128.3release notes

  • Fixes support for using Json[list[str]] as a type.

    0.128.2release notes

  • Strips whitespace from credentials in the Authorization header.

    0.128.1release notes

  • Fixes duplicated anyOf refs for app-level responses with specified content and a Union model.

    0.128.1release notes

  • Fixes TYPE_CHECKING annotations for Python 3.14 (PEP 649).

    0.128.1release notes

  • Improves the error message shown for invalid query parameter type annotations.

    0.128.1release notes

  • Adds a viewport meta tag to improve Swagger UI on mobile devices.

    0.128.1release notes

fastapi 0.1272 changes

Deprecations 1

  • Using pydantic.v1 now emits deprecation warnings.

    0.127.0release notes

New APIs and options 1

  • Adds a custom deprecation warning category, allowing developers to identify FastAPI deprecation warnings.

    0.127.1release notes

fastapi 0.1264 changes

Breaking changes 4

  • The standard dependencies now include pydantic-extra-types version 2.0.0 or later.

    0.126.0release notes

  • The standard dependencies now include pydantic-settings version 2.0.0 or later.

    0.126.0release notes

  • FastAPI drops support for Pydantic v1, while retaining short temporary support for Pydantic v2's pydantic.v1.

    0.126.0release notes

  • The minimum installed Pydantic version is now 2.7.0.

    0.126.0release notes

fastapi 0.1251 changes

Breaking changes 1

  • FastAPI no longer supports Python 3.8; installers on Python 3.8 will refuse the latest version and install 0.124.4 instead.

    0.125.0release notes

fastapi 0.1245 changes

Behavior and default changes 1

  • Tracebacks include endpoint metadata to improve debugging.

    0.124.0release notes

Fixes and other changes 4

  • Fixes parameter aliases.

    0.124.4release notes

  • Fixes support for a tagged union whose discriminator is inside Annotated with Body().

    0.124.3release notes

  • Fixes support for non-evaluated stringified annotations under if TYPE_CHECKING.

    0.124.2release notes

  • Fix handling arbitrary types when arbitrary_types_allowed=True.

    0.124.1release notes

fastapi 0.12319 changes

Behavior and default changes 1

  • Dependables can now be used with functools.partial().

    0.123.5release notes

Fixes and other changes 18

  • Fix using a dependency class, rather than an instance, when the class has a __call__ method.

    0.123.10release notes

  • Fixes OAuth2 scopes in OpenAPI for corner cases involving parent dependencies with scopes and sub-dependency security schemes without scopes.

    0.123.9release notes

  • Fixes OAuth2 scopes declarations and deduplicates security schemes with different scopes in the generated OpenAPI schema.

    0.123.8release notes

  • Fixed evaluating stringified annotations in Python 3.10.

    0.123.7release notes

  • Support combining functools wraps and partial for async and regular functions and classes in path operations and dependencies.

    0.123.6release notes

  • Wrapped functions used with forward references are now supported.

    0.123.5release notes

  • Optional sequences using Python 3.10's new union syntax are now handled correctly.

    0.123.5release notes

  • Wrapped dependencies are now handled.

    0.123.5release notes

  • Fix the behavior of separate_input_output_schemas=False when used with computed_field.

    0.123.4release notesrelease notes

  • Fixes optional sequence handling when serializing sequence values with Pydantic V2.

    0.123.3release notes

  • Fixes the alias for Query, Header, and Cookie parameter models.

    0.123.3release notes

  • Fixes parsing of extra non-body parameter lists.

    0.123.2release notes

  • Fixes unformatted {type_} in FastAPIError messages.

    0.123.2release notes

  • Fixes parsing of extra Form parameter lists.

    0.123.2release notes

  • Form values with empty strings are no longer interpreted as missing (None if that's the default), improving compatibility with HTML forms.

    0.123.2release notes

  • Fixes a TypeError when encoding a decimal with a NaN or Infinity value.

    0.123.1release notes

  • Avoids accessing a non-existing "$ref" key during Pydantic v2 compatibility remapping.

    0.123.1release notes

  • Fixes caching dependencies that don't use scopes and don't have sub-dependencies with scopes.

    0.123.0release notes

fastapi 0.1222 changes

Breaking changes 1

  • Security classes now return 401 when credentials are missing instead of 403; override the classes if you need the previous behavior.

    0.122.0release notes

Security 1

  • Fixes hierarchical security scope propagation.

    0.122.1release notes

fastapi 0.1215 changes

New APIs and options 1

  • Adds dependency scopes, including scope="request" for yield dependencies that exit before the response is sent.

    0.121.0release notes

Behavior and default changes 1

  • Results of Depends() are now hashable, as a workaround for other tools interacting with these internal parts.

    0.121.3release notes

Fixes and other changes 3

  • Results of Security() are now hashable, as a workaround for other tools interacting with these internal parts.

    0.121.3release notes

  • Fixes handling of JSON Schema attributes named "$ref".

    0.121.2release notes

  • Fixes Depends with scope='function' for top-level parameterless dependencies.

    0.121.1release notes

fastapi 0.1202 changes

Fixes and other changes 2

  • Fixes security schemes in OpenAPI when they are added at the top level app.

    0.120.4release notes

  • Fixes separation of schemas with nested models that was introduced in 0.119.0.

    0.120.2release notes

fastapi 0.1191 changes

Fixes and other changes 1

  • Fixes internal Pydantic v1 compatibility warnings for Python 3.14 and Pydantic 2.12.1.

    0.119.1release notes