mirror of
https://github.com/tiennm99/litellm.git
synced 2026-07-11 07:05:00 +00:00
fix: fix linting errors
This commit is contained in:
@@ -2,11 +2,11 @@ import asyncio
|
||||
import json
|
||||
import time
|
||||
import traceback
|
||||
from litellm._uuid import uuid
|
||||
from typing import Dict, Iterable, List, Literal, Optional, Tuple, Union
|
||||
|
||||
import litellm
|
||||
from litellm._logging import verbose_logger
|
||||
from litellm._uuid import uuid
|
||||
from litellm.constants import RESPONSE_FORMAT_TOOL_NAME
|
||||
from litellm.litellm_core_utils.prompt_templates.common_utils import (
|
||||
_extract_reasoning_content,
|
||||
@@ -31,6 +31,7 @@ from litellm.types.utils import Logprobs as TextCompletionLogprobs
|
||||
from litellm.types.utils import (
|
||||
Message,
|
||||
ModelResponse,
|
||||
ModelResponseStream,
|
||||
RerankResponse,
|
||||
StreamingChoices,
|
||||
TextChoices,
|
||||
@@ -108,12 +109,12 @@ async def convert_to_streaming_response_async(response_object: Optional[dict] =
|
||||
if response_object is None:
|
||||
raise Exception("Error in response object format")
|
||||
|
||||
model_response_object = ModelResponse(stream=True)
|
||||
model_response_object = ModelResponseStream()
|
||||
|
||||
if model_response_object is None:
|
||||
raise Exception("Error in response creating model response object")
|
||||
|
||||
choice_list = []
|
||||
choice_list: List[StreamingChoices] = []
|
||||
|
||||
for idx, choice in enumerate(response_object["choices"]):
|
||||
if (
|
||||
@@ -182,8 +183,8 @@ def convert_to_streaming_response(response_object: Optional[dict] = None):
|
||||
if response_object is None:
|
||||
raise Exception("Error in response object format")
|
||||
|
||||
model_response_object = ModelResponse(stream=True)
|
||||
choice_list = []
|
||||
model_response_object = ModelResponseStream()
|
||||
choice_list: List[StreamingChoices] = []
|
||||
for idx, choice in enumerate(response_object["choices"]):
|
||||
delta = Delta(**choice["message"])
|
||||
finish_reason = choice.get("finish_reason", None)
|
||||
|
||||
+136
-38
@@ -1,38 +1,136 @@
|
||||
============================= test session starts ==============================
|
||||
platform darwin -- Python 3.13.1, pytest-8.3.5, pluggy-1.5.0 -- /Users/krrishdholakia/Documents/litellm/myenv/bin/python3.13
|
||||
cachedir: .pytest_cache
|
||||
rootdir: /Users/krrishdholakia/Documents/litellm
|
||||
configfile: pyproject.toml
|
||||
plugins: respx-0.22.0, postgresql-7.0.1, anyio-4.4.0, asyncio-0.26.0, mock-3.14.0, ddtrace-2.19.0rc1, xdist-3.6.1
|
||||
asyncio: mode=Mode.STRICT, asyncio_default_fixture_loop_scope=None, asyncio_default_test_loop_scope=function
|
||||
collecting ... collected 8 items
|
||||
|
||||
test_main.py::test_url_with_format_param[False-anthropic/claude-3-5-sonnet] PASSED [ 12%]
|
||||
test_main.py::test_url_with_format_param[False-bedrock/anthropic.claude-3-5-sonnet-20240620-v1:0] PASSED [ 25%]
|
||||
test_main.py::test_url_with_format_param[False-bedrock/invoke/anthropic.claude-3-5-sonnet-20240620-v1:0] PASSED [ 37%]
|
||||
test_main.py::test_url_with_format_param[False-gemini/gemini-1.5-flash] PASSED [ 50%]
|
||||
test_main.py::test_url_with_format_param[True-anthropic/claude-3-5-sonnet] PASSED [ 62%]
|
||||
test_main.py::test_url_with_format_param[True-bedrock/anthropic.claude-3-5-sonnet-20240620-v1:0] PASSED [ 75%]
|
||||
test_main.py::test_url_with_format_param[True-bedrock/invoke/anthropic.claude-3-5-sonnet-20240620-v1:0] PASSED [ 87%]
|
||||
test_main.py::test_url_with_format_param[True-gemini/gemini-1.5-flash] PASSED [100%]
|
||||
|
||||
=============================== warnings summary ===============================
|
||||
tests/litellm/test_main.py::test_url_with_format_param[False-bedrock/anthropic.claude-3-5-sonnet-20240620-v1:0]
|
||||
tests/litellm/test_main.py::test_url_with_format_param[False-bedrock/invoke/anthropic.claude-3-5-sonnet-20240620-v1:0]
|
||||
tests/litellm/test_main.py::test_url_with_format_param[True-bedrock/anthropic.claude-3-5-sonnet-20240620-v1:0]
|
||||
tests/litellm/test_main.py::test_url_with_format_param[True-bedrock/invoke/anthropic.claude-3-5-sonnet-20240620-v1:0]
|
||||
/Users/krrishdholakia/Documents/litellm/myenv/lib/python3.13/site-packages/botocore/auth.py:425: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC).
|
||||
datetime_now = datetime.datetime.utcnow()
|
||||
|
||||
tests/litellm/test_main.py::test_url_with_format_param[True-anthropic/claude-3-5-sonnet]
|
||||
/Users/krrishdholakia/Documents/litellm/myenv/lib/python3.13/site-packages/pydantic/main.py:421: UserWarning: Pydantic serializer warnings:
|
||||
Expected `str` but got `MagicMock` with value `<MagicMock name='mock().j...em__()' id='5209845984'>` - serialized value may not be as expected
|
||||
return self.__pydantic_serializer__.to_python(
|
||||
|
||||
tests/litellm/test_main.py::test_url_with_format_param[True-bedrock/invoke/anthropic.claude-3-5-sonnet-20240620-v1:0]
|
||||
/Users/krrishdholakia/Documents/litellm/myenv/lib/python3.13/site-packages/pydantic/main.py:421: UserWarning: Pydantic serializer warnings:
|
||||
Expected `str` but got `MagicMock` with value `<MagicMock name='mock().j...em__()' id='5210168288'>` - serialized value may not be as expected
|
||||
return self.__pydantic_serializer__.to_python(
|
||||
|
||||
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
|
||||
======================== 8 passed, 6 warnings in 2.33s =========================
|
||||
litellm_core_utils/llm_response_utils/convert_dict_to_response.py:149: error: Incompatible types in assignment (expression has type "list[StreamingChoices]", variable has type "list[Choices | StreamingChoices]") [assignment]
|
||||
litellm_core_utils/llm_response_utils/convert_dict_to_response.py:149: note: "list" is invariant -- see https://mypy.readthedocs.io/en/stable/common_issues.html#variance
|
||||
litellm_core_utils/llm_response_utils/convert_dict_to_response.py:149: note: Consider using "Sequence" instead, which is covariant
|
||||
litellm_core_utils/llm_response_utils/convert_dict_to_response.py:204: error: Incompatible types in assignment (expression has type "list[StreamingChoices]", variable has type "list[Choices | StreamingChoices]") [assignment]
|
||||
litellm_core_utils/llm_response_utils/convert_dict_to_response.py:204: note: "list" is invariant -- see https://mypy.readthedocs.io/en/stable/common_issues.html#variance
|
||||
litellm_core_utils/llm_response_utils/convert_dict_to_response.py:204: note: Consider using "Sequence" instead, which is covariant
|
||||
litellm_core_utils/llm_response_utils/convert_dict_to_response.py:567: error: Incompatible types in assignment (expression has type "list[Choices]", variable has type "list[Choices | StreamingChoices]") [assignment]
|
||||
litellm_core_utils/llm_response_utils/convert_dict_to_response.py:567: note: "list" is invariant -- see https://mypy.readthedocs.io/en/stable/common_issues.html#variance
|
||||
litellm_core_utils/llm_response_utils/convert_dict_to_response.py:567: note: Consider using "Sequence" instead, which is covariant
|
||||
proxy/_types.py:443: error: Unsupported operand types for + ("list[str]" and "list[KeyManagementRoutes]") [operator]
|
||||
proxy/_types.py:518: error: Unsupported operand types for + ("list[str]" and "list[KeyManagementRoutes]") [operator]
|
||||
router.py:4528: error: Argument "deployment_id" to "increment_deployment_failures_for_current_minute" has incompatible type "Any | None"; expected "str" [arg-type]
|
||||
router.py:5239: error: Argument "custom_llm_provider" to "_initialize_deployment_for_pass_through" of "Router" has incompatible type "str | None"; expected "str" [arg-type]
|
||||
main.py:1373: error: Argument "mock_response" to "mock_completion" has incompatible type "Any | None"; expected "str | Exception | dict[Any, Any]" [arg-type]
|
||||
main.py:1505: error: Argument "azure_ad_token_provider" to "completion" of "AzureChatCompletion" has incompatible type "Any | None"; expected "Callable[..., Any]" [arg-type]
|
||||
main.py:1511: error: Argument "logging_obj" to "completion" of "AzureChatCompletion" has incompatible type "Any | None"; expected "Logging" [arg-type]
|
||||
main.py:1519: error: Item "None" of "Any | None" has no attribute "post_call" [union-attr]
|
||||
main.py:1592: error: Item "None" of "Any | None" has no attribute "post_call" [union-attr]
|
||||
main.py:1612: error: Argument "api_base" to "completion" of "BaseLLMHTTPHandler" has incompatible type "str | None"; expected "str" [arg-type]
|
||||
main.py:1614: error: Argument "logging_obj" to "completion" of "BaseLLMHTTPHandler" has incompatible type "Any | None"; expected "Logging" [arg-type]
|
||||
main.py:1627: error: Item "None" of "Any | None" has no attribute "post_call" [union-attr]
|
||||
main.py:1659: error: Argument "api_base" to "completion" of "BaseLLMHTTPHandler" has incompatible type "str | None"; expected "str" [arg-type]
|
||||
main.py:1661: error: Argument "logging_obj" to "completion" of "BaseLLMHTTPHandler" has incompatible type "Any | None"; expected "Logging" [arg-type]
|
||||
main.py:1673: error: Item "None" of "Any | None" has no attribute "post_call" [union-attr]
|
||||
main.py:1683: error: Item "None" of "Any | None" has no attribute "post_call" [union-attr]
|
||||
main.py:1754: error: Argument "logging_obj" to "completion" of "OpenAITextCompletion" has incompatible type "Any | None"; expected "Logging" [arg-type]
|
||||
main.py:1773: error: Item "None" of "Any | None" has no attribute "post_call" [union-attr]
|
||||
main.py:1789: error: Argument "api_base" to "completion" of "BaseLLMHTTPHandler" has incompatible type "str | None"; expected "str" [arg-type]
|
||||
main.py:1791: error: Argument "logging_obj" to "completion" of "BaseLLMHTTPHandler" has incompatible type "Any | None"; expected "Logging" [arg-type]
|
||||
main.py:1804: error: Item "None" of "Any | None" has no attribute "post_call" [union-attr]
|
||||
main.py:1819: error: Argument "api_base" to "completion" of "BaseLLMHTTPHandler" has incompatible type "str | None"; expected "str" [arg-type]
|
||||
main.py:1821: error: Argument "logging_obj" to "completion" of "BaseLLMHTTPHandler" has incompatible type "Any | None"; expected "Logging" [arg-type]
|
||||
main.py:1833: error: Item "None" of "Any | None" has no attribute "post_call" [union-attr]
|
||||
main.py:1850: error: Argument "api_base" to "completion" of "BaseLLMHTTPHandler" has incompatible type "str | None"; expected "str" [arg-type]
|
||||
main.py:1852: error: Argument "logging_obj" to "completion" of "BaseLLMHTTPHandler" has incompatible type "Any | None"; expected "Logging" [arg-type]
|
||||
main.py:1865: error: Item "None" of "Any | None" has no attribute "post_call" [union-attr]
|
||||
main.py:1913: error: Argument "logging_obj" to "completion" of "BaseLLMHTTPHandler" has incompatible type "Any | None"; expected "Logging" [arg-type]
|
||||
main.py:1945: error: Argument "logging_obj" to "completion" of "BaseLLMAIOHTTPHandler" has incompatible type "Any | None"; expected "Logging" [arg-type]
|
||||
main.py:1978: error: Argument "logging_obj" to "completion" of "BaseLLMHTTPHandler" has incompatible type "Any | None"; expected "Logging" [arg-type]
|
||||
main.py:1991: error: Item "None" of "Any | None" has no attribute "post_call" [union-attr]
|
||||
main.py:2068: error: Argument "logging_obj" to "completion" of "BaseLLMHTTPHandler" has incompatible type "Any | None"; expected "Logging" [arg-type]
|
||||
main.py:2103: error: Item "None" of "Any | None" has no attribute "post_call" [union-attr]
|
||||
main.py:2113: error: Item "None" of "Any | None" has no attribute "post_call" [union-attr]
|
||||
main.py:2136: error: Argument "logging_obj" to "completion" of "BaseLLMHTTPHandler" has incompatible type "Any | None"; expected "Logging" [arg-type]
|
||||
main.py:2190: error: Item "None" of "Any | None" has no attribute "post_call" [union-attr]
|
||||
main.py:2234: error: Argument "logging_obj" to "completion" of "BaseLLMHTTPHandler" has incompatible type "Any | None"; expected "Logging" [arg-type]
|
||||
main.py:2280: error: Argument "logging_obj" to "completion" of "BaseLLMHTTPHandler" has incompatible type "Any | None"; expected "Logging" [arg-type]
|
||||
main.py:2334: error: Item "None" of "Any | None" has no attribute "post_call" [union-attr]
|
||||
main.py:2380: error: Item "None" of "Any | None" has no attribute "post_call" [union-attr]
|
||||
main.py:2466: error: Argument "logging_obj" to "completion" of "BaseLLMHTTPHandler" has incompatible type "Any | None"; expected "Logging" [arg-type]
|
||||
main.py:2515: error: Argument "api_base" to "completion" of "BaseLLMHTTPHandler" has incompatible type "str | None"; expected "str" [arg-type]
|
||||
main.py:2517: error: Argument "logging_obj" to "completion" of "BaseLLMHTTPHandler" has incompatible type "Any | None"; expected "Logging" [arg-type]
|
||||
main.py:2533: error: Argument "api_base" to "completion" of "BaseLLMHTTPHandler" has incompatible type "str | None"; expected "str" [arg-type]
|
||||
main.py:2535: error: Argument "logging_obj" to "completion" of "BaseLLMHTTPHandler" has incompatible type "Any | None"; expected "Logging" [arg-type]
|
||||
main.py:2560: error: Argument "logging_obj" to "completion" of "BaseLLMHTTPHandler" has incompatible type "Any | None"; expected "Logging" [arg-type]
|
||||
main.py:2619: error: Argument "api_base" to "completion" of "BaseLLMHTTPHandler" has incompatible type "str | None"; expected "str" [arg-type]
|
||||
main.py:2628: error: Argument "logging_obj" to "completion" of "BaseLLMHTTPHandler" has incompatible type "Any | None"; expected "Logging" [arg-type]
|
||||
main.py:2633: error: Item "None" of "Any | None" has no attribute "post_call" [union-attr]
|
||||
main.py:2643: error: Item "None" of "Any | None" has no attribute "post_call" [union-attr]
|
||||
main.py:2657: error: Argument "api_base" to "completion" of "BaseLLMHTTPHandler" has incompatible type "str | None"; expected "str" [arg-type]
|
||||
main.py:2659: error: Argument "logging_obj" to "completion" of "BaseLLMHTTPHandler" has incompatible type "Any | None"; expected "Logging" [arg-type]
|
||||
main.py:2729: error: Argument "logging_obj" to "completion" of "BaseLLMHTTPHandler" has incompatible type "Any | None"; expected "Logging" [arg-type]
|
||||
main.py:2733: error: Item "None" of "Any | None" has no attribute "post_call" [union-attr]
|
||||
main.py:2792: error: Argument "logging_obj" to "completion" of "BaseLLMHTTPHandler" has incompatible type "Any | None"; expected "Logging" [arg-type]
|
||||
main.py:2796: error: Item "None" of "Any | None" has no attribute "post_call" [union-attr]
|
||||
main.py:2856: error: Argument "custom_llm_provider" to "completion" of "VertexLLM" has incompatible type "str"; expected "Literal['vertex_ai', 'vertex_ai_beta', 'gemini']" [arg-type]
|
||||
main.py:2925: error: Argument "custom_llm_provider" to "completion" of "VertexLLM" has incompatible type "str"; expected "Literal['vertex_ai', 'vertex_ai_beta', 'gemini']" [arg-type]
|
||||
main.py:3081: error: Argument "api_base" to "completion" of "BaseLLMHTTPHandler" has incompatible type "str | None"; expected "str" [arg-type]
|
||||
main.py:3090: error: Argument "logging_obj" to "completion" of "BaseLLMHTTPHandler" has incompatible type "Any | None"; expected "Logging" [arg-type]
|
||||
main.py:3153: error: Argument "logging_obj" to "completion" of "BedrockConverseLLM" has incompatible type "Any | None"; expected "Logging" [arg-type]
|
||||
main.py:3168: error: Argument "api_base" to "completion" of "BaseLLMHTTPHandler" has incompatible type "str | None"; expected "str" [arg-type]
|
||||
main.py:3177: error: Argument "logging_obj" to "completion" of "BaseLLMHTTPHandler" has incompatible type "Any | None"; expected "Logging" [arg-type]
|
||||
main.py:3186: error: Argument "api_base" to "completion" of "BaseLLMHTTPHandler" has incompatible type "str | None"; expected "str" [arg-type]
|
||||
main.py:3195: error: Argument "logging_obj" to "completion" of "BaseLLMHTTPHandler" has incompatible type "Any | None"; expected "Logging" [arg-type]
|
||||
main.py:3206: error: Argument "api_base" to "completion" of "WatsonXChatHandler" has incompatible type "str | None"; expected "str" [arg-type]
|
||||
main.py:3269: error: Argument "api_base" to "completion" of "BaseLLMHTTPHandler" has incompatible type "str | Any | None"; expected "str" [arg-type]
|
||||
main.py:3279: error: Argument "logging_obj" to "completion" of "BaseLLMHTTPHandler" has incompatible type "Any | None"; expected "Logging" [arg-type]
|
||||
main.py:3333: error: Argument "logging_obj" to "completion" of "BaseLLMHTTPHandler" has incompatible type "Any | None"; expected "Logging" [arg-type]
|
||||
main.py:3367: error: Argument "logging_obj" to "completion" of "BaseLLMHTTPHandler" has incompatible type "Any | None"; expected "Logging" [arg-type]
|
||||
main.py:3378: error: Argument "api_base" to "completion" of "BaseLLMHTTPHandler" has incompatible type "str | None"; expected "str" [arg-type]
|
||||
main.py:3388: error: Argument "logging_obj" to "completion" of "BaseLLMHTTPHandler" has incompatible type "Any | None"; expected "Logging" [arg-type]
|
||||
main.py:3421: error: Argument "logging_obj" to "completion" of "BaseLLMHTTPHandler" has incompatible type "Any | None"; expected "Logging" [arg-type]
|
||||
main.py:3464: error: Argument "api_base" to "completion" of "BaseLLMHTTPHandler" has incompatible type "str | None"; expected "str" [arg-type]
|
||||
main.py:3466: error: Argument "logging_obj" to "completion" of "BaseLLMHTTPHandler" has incompatible type "Any | None"; expected "Logging" [arg-type]
|
||||
main.py:3479: error: Item "None" of "Any | None" has no attribute "post_call" [union-attr]
|
||||
main.py:3493: error: Argument "api_base" to "completion" of "BaseLLMHTTPHandler" has incompatible type "str | None"; expected "str" [arg-type]
|
||||
main.py:3503: error: Argument "logging_obj" to "completion" of "BaseLLMHTTPHandler" has incompatible type "Any | None"; expected "Logging" [arg-type]
|
||||
main.py:3520: error: Argument "api_base" to "completion" of "BaseLLMHTTPHandler" has incompatible type "str | None"; expected "str" [arg-type]
|
||||
main.py:3522: error: Argument "logging_obj" to "completion" of "BaseLLMHTTPHandler" has incompatible type "Any | None"; expected "Logging" [arg-type]
|
||||
main.py:3558: error: Argument "logging_obj" to "completion" of "BaseLLMHTTPHandler" has incompatible type "Any | None"; expected "Logging" [arg-type]
|
||||
main.py:4200: error: Argument "aembedding" to "embedding" of "BaseLLMHTTPHandler" has incompatible type "Any | None"; expected "bool" [arg-type]
|
||||
main.py:4261: error: Argument "aembedding" to "embedding" of "BaseLLMHTTPHandler" has incompatible type "Any | None"; expected "bool" [arg-type]
|
||||
main.py:4501: error: Argument "aembedding" to "embedding" of "BaseLLMHTTPHandler" has incompatible type "Any | None"; expected "bool" [arg-type]
|
||||
main.py:4516: error: Argument "aembedding" to "embedding" of "BaseLLMHTTPHandler" has incompatible type "Any | None"; expected "bool" [arg-type]
|
||||
main.py:4531: error: Argument "aembedding" to "embedding" of "BaseLLMHTTPHandler" has incompatible type "Any | None"; expected "bool" [arg-type]
|
||||
main.py:4557: error: Argument "aembedding" to "embedding" of "BaseLLMHTTPHandler" has incompatible type "Any | None"; expected "bool" [arg-type]
|
||||
main.py:4628: error: Argument "aembedding" to "embedding" of "BaseLLMHTTPHandler" has incompatible type "Any | None"; expected "bool" [arg-type]
|
||||
main.py:4657: error: Argument "aembedding" to "embedding" of "BaseLLMHTTPHandler" has incompatible type "Any | None"; expected "bool" [arg-type]
|
||||
main.py:4679: error: Argument "aembedding" to "embedding" of "BaseLLMHTTPHandler" has incompatible type "Any | None"; expected "bool" [arg-type]
|
||||
main.py:5611: error: Item "None" of "Any | None" has no attribute "update_environment_variables" [union-attr]
|
||||
main.py:5766: error: Argument "logging_obj" to "speech" of "SpeechToCompletionBridgeHandler" has incompatible type "Any | None"; expected "Logging" [arg-type]
|
||||
main.py:5795: error: Argument "logging_obj" to "speech" of "SpeechToCompletionBridgeHandler" has incompatible type "Any | None"; expected "Logging" [arg-type]
|
||||
llms/watsonx/chat/handler.py:73: error: Argument "model" to "completion" of "OpenAILikeChatHandler" has incompatible type "Any | None"; expected "str" [arg-type]
|
||||
llms/vertex_ai/fine_tuning/handler.py:143: error: Argument "vertex_hyper_parameters" to "_translate_vertex_response_hyperparameters" of "VertexFineTuningAPI" has incompatible type "FineTuneHyperparameters | dict[Never, Never]"; expected "FineTuneHyperparameters" [arg-type]
|
||||
llms/openai/completion/transformation.py:103: error: Incompatible types in assignment (expression has type "list[Choices]", variable has type "list[Choices | StreamingChoices]") [assignment]
|
||||
llms/openai/completion/transformation.py:103: note: "list" is invariant -- see https://mypy.readthedocs.io/en/stable/common_issues.html#variance
|
||||
llms/openai/completion/transformation.py:103: note: Consider using "Sequence" instead, which is covariant
|
||||
llms/huggingface/embedding/transformation.py:271: error: Argument "role_dict" to "custom_prompt" has incompatible type "Any | None"; expected "dict[Any, Any]" [arg-type]
|
||||
llms/bedrock/chat/invoke_handler.py:1452: error: Argument "chunk_data" to "converse_chunk_parser" of "AWSEventStreamDecoder" has incompatible type "Any | None"; expected "dict[Any, Any]" [arg-type]
|
||||
llms/anthropic/cost_calculation.py:52: error: Incompatible types in assignment (expression has type "SearchContextCostPerQuery | dict[Never, Never]", variable has type "SearchContextCostPerQuery") [assignment]
|
||||
llms/anthropic/completion/transformation.py:294: error: Incompatible types in assignment (expression has type "Any | None", variable has type "str") [assignment]
|
||||
litellm_core_utils/streaming_handler.py:1374: error: Item "None" of "Any | None" has no attribute "id" [union-attr]
|
||||
litellm_core_utils/streaming_handler.py:1379: error: Argument 1 to "copy_model_response_level_provider_specific_fields" of "CustomStreamWrapper" has incompatible type "Any | None"; expected "ModelResponseStream | ChatCompletionChunk" [arg-type]
|
||||
litellm_core_utils/streaming_handler.py:1382: error: Item "None" of "Any | None" has no attribute "choices" [union-attr]
|
||||
litellm_core_utils/streaming_handler.py:1383: error: Item "None" of "Any | None" has no attribute "choices" [union-attr]
|
||||
litellm_core_utils/streaming_handler.py:1389: error: Item "None" of "Any | None" has no attribute "system_fingerprint" [union-attr]
|
||||
litellm_core_utils/streaming_handler.py:1393: error: Item "None" of "Any | None" has no attribute "choices" [union-attr]
|
||||
litellm_core_utils/streaming_handler.py:1398: error: Item "None" of "Any | None" has no attribute "choices" [union-attr]
|
||||
litellm_core_utils/streaming_handler.py:1403: error: Item "None" of "Any | None" has no attribute "choices" [union-attr]
|
||||
litellm_core_utils/streaming_handler.py:1406: error: Item "None" of "Any | None" has no attribute "choices" [union-attr]
|
||||
litellm_core_utils/streaming_handler.py:1408: error: Item "None" of "Any | None" has no attribute "choices" [union-attr]
|
||||
litellm_core_utils/streaming_handler.py:1410: error: Item "None" of "Any | None" has no attribute "choices" [union-attr]
|
||||
litellm_core_utils/streaming_handler.py:1454: error: Item "None" of "Any | None" has no attribute "choices" [union-attr]
|
||||
litellm_core_utils/streaming_handler.py:1455: error: Item "None" of "Any | None" has no attribute "choices" [union-attr]
|
||||
litellm_core_utils/litellm_logging.py:2989: error: Argument "raw_response" to "transform_response" of "AnthropicConfig" has incompatible type "Any | None"; expected "Response" [arg-type]
|
||||
proxy/guardrails/guardrail_hooks/bedrock_guardrails.py:379: error: Argument "response" to "_get_bedrock_guardrail_response_status" of "BedrockGuardrail" has incompatible type "Any | ModelResponse"; expected "Response" [arg-type]
|
||||
proxy/guardrails/guardrail_hooks/bedrock_guardrails.py:386: error: Item "ModelResponse" of "Any | ModelResponse" has no attribute "status_code" [union-attr]
|
||||
proxy/guardrails/guardrail_hooks/bedrock_guardrails.py:401: error: Item "ModelResponse" of "Any | ModelResponse" has no attribute "status_code" [union-attr]
|
||||
proxy/guardrails/guardrail_hooks/bedrock_guardrails.py:402: error: Item "ModelResponse" of "Any | ModelResponse" has no attribute "text" [union-attr]
|
||||
proxy/auth/oauth2_proxy_hook.py:17: error: Incompatible types in assignment (expression has type "Any | None", variable has type "dict[str, str]") [assignment]
|
||||
proxy/_experimental/mcp_server/cost_calculator.py:53: error: Incompatible types in assignment (expression has type "MCPServerCostInfo | dict[Never, Never]", variable has type "MCPServerCostInfo") [assignment]
|
||||
proxy/management_helpers/utils.py:39: error: Incompatible types (expression has type "Any | None", TypedDict item "models" has type "list[str]") [typeddict-item]
|
||||
proxy/pass_through_endpoints/pass_through_endpoints.py:501: error: Unsupported type "dict[str, Any]" for ** expansion in TypedDict [typeddict-item]
|
||||
proxy/management_endpoints/ui_sso.py:895: error: Item "dict[Any, Any]" of "Any | dict[Any, Any]" has no attribute "provider" [union-attr]
|
||||
proxy/enterprise/litellm_enterprise/integrations/prometheus.py:2265: error: Incompatible types in assignment (expression has type "Any | None", variable has type "dict[Any, Any]") [assignment]
|
||||
Found 127 errors in 20 files (checked 1114 source files)
|
||||
|
||||
Reference in New Issue
Block a user