fix: address review feedback on Any reduction

- drop redundant Protocol docstrings in dynamodb and otel mount
- widen hosted_vllm custom-tool conversion signature from Any to object
This commit is contained in:
mateo-berri 2026-09-14 07:31:41 +00:00
parent 6df5eef768
commit e46c816ec7
3 changed files with 2 additions and 8 deletions

View file

@ -11,14 +11,10 @@ from litellm._uuid import uuid
class _DynamoTable(Protocol):
"""The one boto3 DynamoDB table call this logger makes."""
def put_item(self, *, Item: Mapping[str, object]) -> object: ...
class _DynamoResource(Protocol):
"""The one boto3 DynamoDB resource call this logger makes."""
def Table(self, name: str) -> _DynamoTable: ...

View file

@ -69,8 +69,6 @@ PASSTHROUGH_PREFIXES: Final = frozenset(
class _RenameableSpan(Protocol):
"""The span surface the passthrough naming hook drives."""
def is_recording(self) -> bool: ...
def update_name(self, name: str) -> None: ...

View file

@ -4,7 +4,7 @@ Translate from OpenAI's `/v1/chat/completions` to VLLM's `/v1/chat/completions`
import json
from collections.abc import Coroutine
from typing import Any, Final, Literal, cast, overload
from typing import Final, Literal, cast, overload
from litellm.litellm_core_utils.prompt_templates.common_utils import (
_get_image_mime_type_from_url,
@ -28,7 +28,7 @@ from ...openai.chat.gpt_transformation import OpenAIGPTConfig
class HostedVLLMChatConfig(OpenAIGPTConfig):
def _convert_custom_tools_to_function_tools(self, tools: list[dict[str, Any]]) -> list[dict[str, object]]:
def _convert_custom_tools_to_function_tools(self, tools: list[dict[str, object]]) -> list[dict[str, object]]:
"""
vLLM chat completions currently accepts only OpenAI function tools.
Convert custom tools into function tools so request validation does not fail.