← fastapi/fastapi
CodeVetter · Repo Unpack · Behavior traces

fastapi/fastapi

Scanned commit 50113da16f dated 2026-09-01 — last upstream commit. Generated by codevetter codevetter 1.12.0 on 2026-09-22. Deep analysis by claude-opus-5 via the claude CLI on 2026-09-22 (413s).

Three flows dominate: application construction, a normal HTTP request, and OpenAPI generation. Construction is eager — dependants and response fields are computed at decoration time, so route registration errors surface at import. A request walks ASGI middleware, router matching (now indirected through `_IncludedRouter` for included routers), the exit-stack-wrapping `request_response` shim, dependency solving, endpoint invocation, and serialization. Streaming requests diverge at the handler into three branches (SSE, JSONL, raw generator). WebSockets follow a parallel but simpler path with no body parsing and no response serialization.