fix(types): import CachedTokensDetails on its own line in openai.py
Some checks failed
ai-gateway image / ai-gateway release image (push) Has been cancelled
LiteLLM Rust / rust-lint (push) Has been cancelled
LiteLLM Rust / rust-test (push) Has been cancelled

CodeQL resolves `from openai import Omit` in litellm/types/llms/openai.py to the
module itself, so every importer of a name whose definition line is in the diff
is reported as an unsafe cyclic import. 76ae35dfcd edited the line that defines
BaseLiteLLMOpenAIResponseObject there and got two alerts at files this PR does
not touch. That line is now byte-identical to main and CachedTokensDetails
arrives through a relative import isort keeps separate.
This commit is contained in:
mateo-berri 2026-09-13 01:54:12 -07:00
parent 76ae35dfcd
commit 6f7882db34

View file

@ -82,7 +82,7 @@ from typing_extensions import (
override,
)
from litellm.types.llms.base import BaseLiteLLMOpenAIResponseObject, CachedTokensDetails
from litellm.types.llms.base import BaseLiteLLMOpenAIResponseObject
from litellm.types.responses.main import (
CustomToolCallOutputItem,
GenericResponseOutputItem,
@ -91,6 +91,8 @@ from litellm.types.responses.main import (
OutputImageGenerationCall,
)
from .base import CachedTokensDetails
FileContent = IO[bytes] | bytes | PathLike
FileTypes = (