FastAPI 0.143.1 Fixes Route Metadata in iter_route_contexts()

FastAPI·26 Oct 2026·2 min read

#fastapi

FastAPI has published 0.143.1, a narrow patch release that addresses a single regression in route introspection. The fix targets iter_route_contexts(), the helper that yields context objects describing each route in an application, and ensures that metadata belonging to routes added via include_router() is no longer dropped. The change was authored by @tiangolo and merged as PR #16484.

  • Fix included route metadata in iter_route_contexts() (PR #16484, by @tiangolo).

The release notes describe the update simply as a bug fix, with no new APIs, deprecations or configuration flags attached. That is typical for a patch-level bump: the version number signals that behaviour is being restored toward what callers already expected, rather than extended. Because the defect lived in a context-iteration helper rather than in request handling, it would not have changed responses served to clients; it affected the data developers read when walking the route table programmatically.

That distinction matters for anyone building tooling on top of FastAPI. iter_route_contexts() underpins introspection use cases such as generating documentation, producing route inventories for dashboards, wiring custom OpenAPI output, or writing tests that assert over the full set of registered endpoints. When metadata from included routers was omitted, those tools could silently under-report routes or lose the tags, names and dependencies attached to them, and the resulting output would look correct without being complete. Upgrading to 0.143.1 restores the expected metadata for included routes, so introspection output matches the application as it was actually assembled.

The upgrade is low risk and needs no code changes from application authors: install [email protected] and re-run any tooling that inspects routes to confirm it now sees the metadata it previously missed. Teams that pinned an earlier 0.143.x release should move forward, while those still on older minor lines can treat this as one more reason to schedule an upgrade.

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

Related

auto-curated · source linked above← all news