CodeTracked since May 21, 2026
Cache openai-python response typing helpers in cognee LLM path
This PR adds memoization for openai-python type-introspection helpers used in Cognee’s OpenAI response pipeline, wrapping `get_origin`, `get_args`, `is_annotated_type`, and `is_literal_type` with `functools.lru_cache` and rebinding both source modules and imported aliases so cached versions are used by response/client call sites; a measured 200-document Cognify run shows CPU time falling from 93.85s to 67.70s (~28%).
openai-pythoncognee.infrastructure.llmfunctools.lru_cacheget_origin