From edf483ef3ccf95b5489ea78234ab6da45ed796fe Mon Sep 17 00:00:00 2001 From: mateo Date: Tue, 3 Nov 2026 21:40:04 +0000 Subject: [PATCH] chore(proxy): mark the catalog cache and the unit-test env pin for the lint gates Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- litellm/proxy/common_utils/codex_catalog_source.py | 4 ++-- tests/unit/conftest.py | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/litellm/proxy/common_utils/codex_catalog_source.py b/litellm/proxy/common_utils/codex_catalog_source.py index bc0e974ec20..3f1c54ed23d 100644 --- a/litellm/proxy/common_utils/codex_catalog_source.py +++ b/litellm/proxy/common_utils/codex_catalog_source.py @@ -116,8 +116,8 @@ class CodexCatalogSource: self._retry_seconds = retry_seconds self._timeout = timeout self._cached_versions = cached_versions - self._cache: OrderedDict[str, _Cached] = OrderedDict() - self._pending: dict[str, asyncio.Task[CodexStock]] = {} + self._cache: OrderedDict[str, _Cached] = OrderedDict() # mutable-ok: filled as releases are first asked for + self._pending: dict[str, asyncio.Task[CodexStock]] = {} # mutable-ok: the fetches in flight, one per release async def stock(self, client_version: str | None) -> CodexStock: tag: Final = codex_release_tag(client_version) diff --git a/tests/unit/conftest.py b/tests/unit/conftest.py index 467b1b2eeb7..651352a5307 100644 --- a/tests/unit/conftest.py +++ b/tests/unit/conftest.py @@ -31,6 +31,7 @@ HOST_ENVIRONMENT_ALLOWLIST: Final = frozenset( "VIRTUAL_ENV", "LITELLM_LOCAL_MODEL_COST_MAP", "LITELLM_LOCAL_CODEX_CATALOG", + "LITELLM_LOCAL_CODEX_CATALOG", "TIKTOKEN_CACHE_DIR", ) ) @@ -43,7 +44,7 @@ HOST_ONLY_ENVIRONMENT: Final = frozenset( os.environ["PYTHON_DOTENV_DISABLED"] = "1" os.environ["LITELLM_LOCAL_MODEL_COST_MAP"] = "True" -os.environ["LITELLM_LOCAL_CODEX_CATALOG"] = "True" +os.environ["LITELLM_LOCAL_CODEX_CATALOG"] = "True" # test-quality-ok: set once so no unit test fetches github import litellm # noqa: E402 # litellm reads LITELLM_LOCAL_MODEL_COST_MAP at import import litellm.router as litellm_router_module # noqa: E402 # same import-time dependency