MCPcopy Index your code
hub / github.com/google/adk-python / context_propagation

Function context_propagation

src/google/adk/cli/fast_api.py:831–840  ·  view source on GitHub ↗
(
        request: Request, call_next: Callable[[Request], Awaitable[Any]]
    )

Source from the content-addressed store, hash-verified

829
830 @app.middleware("http")
831 async def context_propagation(
832 request: Request, call_next: Callable[[Request], Awaitable[Any]]
833 ) -> Any:
834 ctx = get_propagated_context(request)
835 token = context.attach(ctx)
836 try:
837 response = await call_next(request)
838 return response
839 finally:
840 context.detach(token)
841
842 @app.post(
843 "/api/reasoning_engine",

Callers

nothing calls this directly

Calls 3

get_propagated_contextFunction · 0.85
attachMethod · 0.45
detachMethod · 0.45

Tested by

no test coverage detected