fix(vllm): repair the return annotation after the PEP 604 migration

litellm_internal_staging moved this module to X | None and dropped
Optional from its typing import, while this branch added a method
annotated Optional["CostResponseTypes"]. The merge was textually clean
but left the module raising NameError on import.

Use the quoted PEP 604 form the rest of the file now uses, and record a
mutable-ok reason for the request_data dict the base class signature
fixes.
This commit is contained in:
David-Wu1119 2026-08-13 18:11:53 +08:00
parent 042ca4e1f7
commit d99c70b7ea

View file

@ -39,10 +39,10 @@ class VLLMPassthroughConfig(VLLMModelInfo, BasePassthroughConfig):
model: str,
custom_llm_provider: str,
httpx_response: "Response",
request_data: dict,
request_data: dict, # mutable-ok: base class signature
logging_obj: "LiteLLMLoggingObj",
endpoint: str,
) -> Optional["CostResponseTypes"]:
) -> "CostResponseTypes | None":
from litellm import encoding
from litellm.llms.openai.chat.gpt_transformation import OpenAIGPTConfig
from litellm.types.utils import EmbeddingResponse, ModelResponse, Usage