qfa.services.call_context#
Request-scoped ContextVar carrying tenant + operation to tracking adapters.
The orchestrator enters call_scope(...) at each public-method entry; the
TrackingLLMAdapter reads current_call_context.get() at LLM-call time.
asyncio propagates ContextVars across create_task / gather via
snapshot-on-spawn, so fan-out from a public orchestrator method preserves the
context without explicit forwarding.
Functions
|
Set |
- qfa.services.call_context.call_scope(tenant_id: str, operation: Operation) AsyncIterator[CallContext][source]#
Set
current_call_contextfor the duration of the block.