From dc5543a52f9a2d280dd45e5e5c20aa57581754de Mon Sep 17 00:00:00 2001 From: Joshua Valluru <326636767+joshua-berri@users.noreply.github.com> Date: Tue, 20 Oct 2026 18:19:31 -0700 Subject: [PATCH] test(bedrock): clean duplicate imports on the stable line --- litellm/llms/bedrock/common_utils.py | 2 +- tests/integration/mcp/test_mcp_transports.py | 6 +-- tests/local_testing/test_get_model_info.py | 10 ++--- tests/unit/conftest.py | 16 +++++-- .../test_mcp_client.py | 5 ++- ...ations_anthropic_claude3_transformation.py | 2 - .../chat/test_bedrock_converse_handler.py | 1 + .../chat/test_converse_transformation.py | 45 ------------------- .../test_anthropic_claude3_transformation.py | 22 +++++---- .../llms/bedrock/test_bedrock_common_utils.py | 12 +---- tests/unit/test_constants.py | 6 +-- tests/unit/test_utils.py | 1 - 12 files changed, 38 insertions(+), 90 deletions(-) diff --git a/litellm/llms/bedrock/common_utils.py b/litellm/llms/bedrock/common_utils.py index 556df4ac508..6e241b44483 100644 --- a/litellm/llms/bedrock/common_utils.py +++ b/litellm/llms/bedrock/common_utils.py @@ -436,7 +436,7 @@ def apply_bedrock_invoke_structured_output( else: request_body["output_config"] = { # mutable-ok: wire request JSON object "format": native_format - } # rebind-ok: out-param + } return verbose_logger.warning( diff --git a/tests/integration/mcp/test_mcp_transports.py b/tests/integration/mcp/test_mcp_transports.py index 48a3b53abf7..31283818041 100644 --- a/tests/integration/mcp/test_mcp_transports.py +++ b/tests/integration/mcp/test_mcp_transports.py @@ -1,12 +1,11 @@ -from integration._support.process import owned_proxy -import yaml -from pathlib import Path import json import uuid +from pathlib import Path from typing import Final import httpx import pytest +import yaml from integration._support.client import Gateway from integration._support.mcp import ( ENTRY_POINTS, @@ -25,6 +24,7 @@ from integration._support.mcp import ( text_result, tool_calls, ) +from integration._support.process import owned_proxy ADD: Final = {"http": "add", "sse": "add", "stdio": "add", "openapi": "getpet"} ARGUMENTS: Final = {"add": {"a": 3, "b": 4}, "getpet": {"petId": "7"}} diff --git a/tests/local_testing/test_get_model_info.py b/tests/local_testing/test_get_model_info.py index a4fc783c3e5..08c4fd872ef 100644 --- a/tests/local_testing/test_get_model_info.py +++ b/tests/local_testing/test_get_model_info.py @@ -1,17 +1,14 @@ -from typing import Final # What is this? ## Unit testing for the 'get_model_info()' function import os - - -from typing import List, Dict, Any +from typing import Any, Dict, Final, List +from unittest.mock import MagicMock, patch import pytest import litellm from litellm import get_model_info from litellm.utils import _invalidate_model_cost_lowercase_map -from unittest.mock import MagicMock, patch def test_get_model_info_simple_model_name(): @@ -221,8 +218,7 @@ def test_get_model_info_custom_provider(): def test_get_model_info_custom_model_router(): - from litellm import Router - from litellm import get_model_info + from litellm import Router, get_model_info litellm._turn_on_debug() diff --git a/tests/unit/conftest.py b/tests/unit/conftest.py index b2f15299662..2c111555879 100644 --- a/tests/unit/conftest.py +++ b/tests/unit/conftest.py @@ -44,17 +44,25 @@ import litellm # noqa: E402 # litellm reads LITELLM_LOCAL_MODEL_COST_MAP at im import litellm.router as litellm_router_module # noqa: E402 # same import-time dependency import litellm.utils as litellm_utils_module # noqa: E402 # same import-time dependency from litellm._logging import ALL_LOGGERS # noqa: E402 # same import-time dependency -from litellm.anthropic_beta_headers_manager import reload_beta_headers_config # noqa: E402 # same import-time dependency +from litellm.anthropic_beta_headers_manager import ( + reload_beta_headers_config, # noqa: E402 # same import-time dependency +) from litellm.litellm_core_utils.logging_worker import GLOBAL_LOGGING_WORKER # noqa: E402 # same import-time dependency -from litellm.litellm_core_utils.prompt_templates import factory as prompt_factory_module # noqa: E402 # same import-time dependency +from litellm.litellm_core_utils.prompt_templates import ( + factory as prompt_factory_module, # noqa: E402 # same import-time dependency +) from litellm.litellm_core_utils.prompt_templates import ( # noqa: E402 # same import-time dependency image_handling as image_handling_module, ) -from litellm.llms.gemini.chat import transformation as gemini_chat_transformation_module # noqa: E402 # same import-time dependency from litellm.llms.custom_httpx.async_client_cleanup import ( # noqa: E402 # same import-time dependency close_litellm_async_clients, ) -from litellm.proxy.db import tool_registry_writer as tool_registry_writer_module # noqa: E402 # same import-time dependency +from litellm.llms.gemini.chat import ( + transformation as gemini_chat_transformation_module, # noqa: E402 # same import-time dependency +) +from litellm.proxy.db import ( + tool_registry_writer as tool_registry_writer_module, # noqa: E402 # same import-time dependency +) LOOPBACK_HOSTS: Final = ["127.0.0.1", "::1", "localhost"] AMBIENT_AZURE_CREDENTIAL_ENV_VARS: Final = ( diff --git a/tests/unit/experimental_mcp_client/test_mcp_client.py b/tests/unit/experimental_mcp_client/test_mcp_client.py index 403885efcef..44671b161df 100644 --- a/tests/unit/experimental_mcp_client/test_mcp_client.py +++ b/tests/unit/experimental_mcp_client/test_mcp_client.py @@ -1633,7 +1633,9 @@ async def test_http_response_handler_preserves_success_and_http_errors(status_co @pytest.mark.asyncio async def test_http_status_check_allows_auth_refresh_before_rejecting() -> None: - from litellm.proxy._experimental.mcp_server.outbound_credentials.client_credentials import ClientCredentialsBearerAuth + from litellm.proxy._experimental.mcp_server.outbound_credentials.client_credentials import ( + ClientCredentialsBearerAuth, + ) seen = [] @@ -1887,6 +1889,7 @@ async def test_sse_read_failure_is_preserved() -> None: @pytest.mark.parametrize("mode", ["ok", "closed", "silent"]) async def test_transport_completion_and_normal_messages(transport: MCPTransport, mode: str) -> None: from mcp import ClientSession + from litellm.proxy._experimental.mcp_server.rest_endpoints import _connection_error_message logging_callback: Final = AsyncMock() diff --git a/tests/unit/llms/bedrock/chat/invoke_transformations/test_bedrock_chat_invoke_transformations_anthropic_claude3_transformation.py b/tests/unit/llms/bedrock/chat/invoke_transformations/test_bedrock_chat_invoke_transformations_anthropic_claude3_transformation.py index d97422a6f0d..d42e584081e 100644 --- a/tests/unit/llms/bedrock/chat/invoke_transformations/test_bedrock_chat_invoke_transformations_anthropic_claude3_transformation.py +++ b/tests/unit/llms/bedrock/chat/invoke_transformations/test_bedrock_chat_invoke_transformations_anthropic_claude3_transformation.py @@ -15,14 +15,12 @@ from pydantic import BaseModel, ConfigDict # Ensure the project root is on the import path so `litellm` can be imported when # tests are executed from any working directory. - import litellm from litellm.llms.bedrock.chat.invoke_transformations.anthropic_claude3_transformation import ( AmazonAnthropicClaudeConfig, ) from litellm.llms.custom_httpx.http_handler import AsyncHTTPHandler - ONE_PIXEL_PNG = base64.b64decode( "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNkYPhfDwAChwGA60e6kgAAAABJRU5ErkJggg==" ) diff --git a/tests/unit/llms/bedrock/chat/test_bedrock_converse_handler.py b/tests/unit/llms/bedrock/chat/test_bedrock_converse_handler.py index 7caef1e8467..5a75b8d384b 100644 --- a/tests/unit/llms/bedrock/chat/test_bedrock_converse_handler.py +++ b/tests/unit/llms/bedrock/chat/test_bedrock_converse_handler.py @@ -1,4 +1,5 @@ import litellm + """Tests for `BedrockConverseLLM.completion`. AWS credential resolution is stubbed so nothing reaches STS. diff --git a/tests/unit/llms/bedrock/chat/test_converse_transformation.py b/tests/unit/llms/bedrock/chat/test_converse_transformation.py index 405f8334f60..0d382f92437 100644 --- a/tests/unit/llms/bedrock/chat/test_converse_transformation.py +++ b/tests/unit/llms/bedrock/chat/test_converse_transformation.py @@ -2255,7 +2255,6 @@ async def test_assistant_message_cache_control(): """Test that assistant messages with cache_control generate cachePoint blocks.""" from litellm.litellm_core_utils.prompt_templates.factory import ( BedrockConverseMessagesProcessor, - _bedrock_converse_messages_pt, ) # Test assistant message with string content and cache_control @@ -2308,7 +2307,6 @@ async def test_assistant_message_list_content_cache_control(): """Test assistant messages with list content and cache_control.""" from litellm.litellm_core_utils.prompt_templates.factory import ( BedrockConverseMessagesProcessor, - _bedrock_converse_messages_pt, ) messages = [ @@ -2352,7 +2350,6 @@ async def test_tool_message_cache_control(): """Test that tool messages with cache_control generate cachePoint blocks.""" from litellm.litellm_core_utils.prompt_templates.factory import ( BedrockConverseMessagesProcessor, - _bedrock_converse_messages_pt, ) messages = [ @@ -2416,7 +2413,6 @@ async def test_tool_message_string_content_cache_control(): """Test tool messages with string content and message-level cache_control.""" from litellm.litellm_core_utils.prompt_templates.factory import ( BedrockConverseMessagesProcessor, - _bedrock_converse_messages_pt, ) messages = [ @@ -2472,7 +2468,6 @@ async def test_tool_message_search_results_maps_to_bedrock_search_result_block() """OpenAI tool message search_results should map to Bedrock searchResult blocks.""" from litellm.litellm_core_utils.prompt_templates.factory import ( BedrockConverseMessagesProcessor, - _bedrock_converse_messages_pt, ) messages = [ @@ -2533,7 +2528,6 @@ async def test_tool_message_empty_search_results_falls_back_to_content(): """Empty search_results must not skip normal tool content processing.""" from litellm.litellm_core_utils.prompt_templates.factory import ( BedrockConverseMessagesProcessor, - _bedrock_converse_messages_pt, ) messages = [ @@ -2702,7 +2696,6 @@ async def test_assistant_tool_calls_cache_control(): """Test that assistant tool_calls with cache_control generate cachePoint blocks.""" from litellm.litellm_core_utils.prompt_templates.factory import ( BedrockConverseMessagesProcessor, - _bedrock_converse_messages_pt, ) messages = [ @@ -2754,7 +2747,6 @@ async def test_multiple_tool_calls_with_mixed_cache_control(): """Test multiple tool calls where only some have cache_control.""" from litellm.litellm_core_utils.prompt_templates.factory import ( BedrockConverseMessagesProcessor, - _bedrock_converse_messages_pt, ) messages = [ @@ -2815,7 +2807,6 @@ async def test_no_cache_control_no_cache_point(): """Test that messages without cache_control don't generate cachePoint blocks.""" from litellm.litellm_core_utils.prompt_templates.factory import ( BedrockConverseMessagesProcessor, - _bedrock_converse_messages_pt, ) messages = [ @@ -2860,9 +2851,6 @@ async def test_no_cache_control_no_cache_point(): def test_guarded_text_wraps_in_guardrail_converse_content(): """Test that guarded_text content type gets wrapped in guardContent blocks.""" - from litellm.litellm_core_utils.prompt_templates.factory import ( - _bedrock_converse_messages_pt, - ) messages = [ { @@ -2963,9 +2951,6 @@ def test_guarded_text_with_system_messages(): def test_guarded_text_with_mixed_content_types(): """Test guarded_text with mixed content types including images.""" - from litellm.litellm_core_utils.prompt_templates.factory import ( - _bedrock_converse_messages_pt, - ) messages = [ { @@ -3052,9 +3037,6 @@ async def test_async_guarded_text(): def test_guarded_text_with_tool_calls(): """Test guarded_text with tool calls in the conversation.""" - from litellm.litellm_core_utils.prompt_templates.factory import ( - _bedrock_converse_messages_pt, - ) messages = [ { @@ -3704,9 +3686,6 @@ def test_empty_assistant_message_handling(): """ # Import the litellm module that factory.py uses to ensure we patch the correct reference import litellm.litellm_core_utils.prompt_templates.factory as factory_module - from litellm.litellm_core_utils.prompt_templates.factory import ( - _bedrock_converse_messages_pt, - ) # Test case 1: Empty string content - test with modify_params=True to prevent merging messages = [ @@ -3796,9 +3775,6 @@ def test_empty_assistant_message_handling(): def test_bedrock_converse_trailing_prefix_assistant_skips_user_continue(): """Assistant prefill (prefix: true) must not inject a dummy user 'Please continue.' turn.""" import litellm.litellm_core_utils.prompt_templates.factory as factory_module - from litellm.litellm_core_utils.prompt_templates.factory import ( - _bedrock_converse_messages_pt, - ) messages = [ {"role": "user", "content": "Hello, how are you?"}, @@ -3825,9 +3801,6 @@ def test_bedrock_converse_trailing_prefix_assistant_skips_user_continue(): def test_bedrock_converse_leading_prefix_assistant_skips_user_continue(): """Leading assistant with prefix: true should not prepend dummy user.""" import litellm.litellm_core_utils.prompt_templates.factory as factory_module - from litellm.litellm_core_utils.prompt_templates.factory import ( - _bedrock_converse_messages_pt, - ) messages = [ {"role": "assistant", "content": "Partial", "prefix": True}, @@ -6338,9 +6311,6 @@ def test_bedrock_tool_message_openai_file_pdf_becomes_document(): inside a tool message content list should translate to a Bedrock toolResult.content[].document block. """ - from litellm.litellm_core_utils.prompt_templates.factory import ( - _bedrock_converse_messages_pt, - ) pdf_b64 = "JVBERi0xLjQKJeLjz9MK" # tiny "%PDF-1.4\n" header messages = [ @@ -6381,9 +6351,6 @@ def test_bedrock_tool_message_image_url_pdf_data_uri_becomes_document(): BedrockImageProcessor correctly returns a {"document": ...} block, but the tool-result wrapper only appended the "image" case, silently dropping documents. """ - from litellm.litellm_core_utils.prompt_templates.factory import ( - _bedrock_converse_messages_pt, - ) pdf_b64 = "JVBERi0xLjQKJeLjz9MK" messages = [ @@ -6426,7 +6393,6 @@ def test_bedrock_tool_message_file_id_http_url_becomes_document(): from litellm.litellm_core_utils.prompt_templates.factory import ( BedrockImageProcessor, - _bedrock_converse_messages_pt, ) pdf_url = "https://example.com/whitepaper.pdf" @@ -6480,9 +6446,6 @@ def test_bedrock_tool_message_file_without_data_or_id_raises(): see an empty tool result and obscures the caller bug. """ import litellm - from litellm.litellm_core_utils.prompt_templates.factory import ( - _bedrock_converse_messages_pt, - ) messages = [ {"role": "user", "content": "Summarize."}, @@ -6509,9 +6472,6 @@ def test_bedrock_tool_message_image_url_png_still_becomes_image(): to a Bedrock image block (not document). Locks in existing behavior after the document-passthrough fix. """ - from litellm.litellm_core_utils.prompt_templates.factory import ( - _bedrock_converse_messages_pt, - ) png_b64 = "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR4nGNgYGBgAAAABQABXvMqOgAAAABJRU5ErkJggg==" messages = [ @@ -6708,7 +6668,6 @@ async def test_grounding_source_and_query_rendered_as_text(): otherwise vanish from the prompt.""" from litellm.litellm_core_utils.prompt_templates.factory import ( BedrockConverseMessagesProcessor, - _bedrock_converse_messages_pt, ) messages = [ @@ -7207,7 +7166,6 @@ async def test_message_level_cache_control_honors_ttl_for_supported_model( hardcoded `{"type": "default"}`), silently downgrading 1h to 5m.""" from litellm.litellm_core_utils.prompt_templates.factory import ( BedrockConverseMessagesProcessor, - _bedrock_converse_messages_pt, ) messages = _agentic_messages_with_ttl(ttl_target) @@ -7233,9 +7191,6 @@ async def test_message_level_cache_control_honors_ttl_for_supported_model( def test_message_level_cache_control_drops_ttl_for_unsupported_model(ttl_target): """Models outside the extended-caching allow-list must keep emitting the plain `{"type": "default"}` cachePoint (Bedrock rejects `ttl` for them).""" - from litellm.litellm_core_utils.prompt_templates.factory import ( - _bedrock_converse_messages_pt, - ) result = _bedrock_converse_messages_pt( messages=_agentic_messages_with_ttl(ttl_target), diff --git a/tests/unit/llms/bedrock/messages/invoke_transformations/test_anthropic_claude3_transformation.py b/tests/unit/llms/bedrock/messages/invoke_transformations/test_anthropic_claude3_transformation.py index 3d4a637fc26..0017bf1c749 100644 --- a/tests/unit/llms/bedrock/messages/invoke_transformations/test_anthropic_claude3_transformation.py +++ b/tests/unit/llms/bedrock/messages/invoke_transformations/test_anthropic_claude3_transformation.py @@ -1,4 +1,3 @@ -from litellm.llms.custom_httpx.http_handler import AsyncHTTPHandler import asyncio import base64 import copy @@ -10,7 +9,6 @@ from collections.abc import AsyncIterator, Mapping, Sequence from dataclasses import dataclass from datetime import datetime from types import SimpleNamespace -from collections.abc import AsyncIterator, Mapping, Sequence from typing import Final from unittest.mock import Mock @@ -18,15 +16,6 @@ import httpx import pytest from pydantic import TypeAdapter -# Ensure the project root is on the import path so `litellm` can be imported when -# tests are executed from any working directory. - -from litellm.litellm_core_utils.litellm_logging import Logging as LiteLLMLoggingObj -from litellm.llms.bedrock.common_utils import ( - ensure_bedrock_anthropic_messages_tool_names, - normalize_custom_field_on_tools, - normalize_tool_input_schema_types_for_bedrock_invoke, -) import litellm from litellm.constants import ( BEDROCK_MIN_THINKING_BUDGET_TOKENS, @@ -34,13 +23,23 @@ from litellm.constants import ( DEFAULT_REASONING_EFFORT_MEDIUM_THINKING_BUDGET, DEFAULT_REASONING_EFFORT_XHIGH_THINKING_BUDGET, ) + +# Ensure the project root is on the import path so `litellm` can be imported when +# tests are executed from any working directory. +from litellm.litellm_core_utils.litellm_logging import Logging as LiteLLMLoggingObj from litellm.llms.anthropic.experimental_pass_through.messages.mid_conversation_system import ( as_system_content_blocks, ) +from litellm.llms.bedrock.common_utils import ( + ensure_bedrock_anthropic_messages_tool_names, + normalize_custom_field_on_tools, + normalize_tool_input_schema_types_for_bedrock_invoke, +) from litellm.llms.bedrock.messages.invoke_transformations.anthropic_claude3_transformation import ( AmazonAnthropicClaudeMessagesConfig, AmazonAnthropicClaudeMessagesStreamDecoder, ) +from litellm.llms.custom_httpx.http_handler import AsyncHTTPHandler @pytest.mark.asyncio @@ -3008,7 +3007,6 @@ def test_bedrock_messages_thinking_shape_follows_exact_bedrock_entry_flag( forced ``thinking.type='adaptive'`` even with ``supports_adaptive_thinking`` explicitly set to ``false`` on the entry.""" import litellm - from litellm.types.router import GenericLiteLLMParams model = "global.anthropic.claude-opus-4-8" diff --git a/tests/unit/llms/bedrock/test_bedrock_common_utils.py b/tests/unit/llms/bedrock/test_bedrock_common_utils.py index 7cc3319bd73..4dc5fedeb18 100644 --- a/tests/unit/llms/bedrock/test_bedrock_common_utils.py +++ b/tests/unit/llms/bedrock/test_bedrock_common_utils.py @@ -46,7 +46,7 @@ def test_bedrock_response_stream_shape_lazy_loads_once(): """ get_bedrock_response_stream_shape() loads from botocore at most once per process. """ - from unittest.mock import MagicMock, patch + from unittest.mock import MagicMock import litellm.llms.bedrock.common_utils as mod @@ -74,7 +74,6 @@ def test_bedrock_response_stream_shape_load_failure_returns_none(): should return None rather than propagating the exception, so the module still imports cleanly. """ - from unittest.mock import patch import litellm.llms.bedrock.common_utils as mod @@ -136,7 +135,7 @@ def test_bedrock_parse_message_from_event_raises_on_none_shape(): _parse_message_from_event must raise BedrockError before touching the botocore parser — not an opaque AttributeError from inside botocore. """ - from unittest.mock import MagicMock, patch + from unittest.mock import MagicMock import litellm.llms.bedrock.common_utils as mod from litellm.llms.bedrock.common_utils import ( @@ -260,7 +259,6 @@ def test_context_window_suffix_stripped_for_cost_lookup(): Models configured like `bedrock/us.anthropic.claude-opus-4-6-v1[1m]` should resolve to the base model name so pricing can be found. """ - from litellm.llms.bedrock.common_utils import get_bedrock_base_model assert get_bedrock_base_model("us.anthropic.claude-opus-4-6-v1[1m]") == "anthropic.claude-opus-4-6-v1" assert get_bedrock_base_model("us.anthropic.claude-sonnet-4-6[1m]") == "anthropic.claude-sonnet-4-6" @@ -280,7 +278,6 @@ def test_context_window_suffix_stripped_for_cost_lookup(): def test_legacy_mantle_route_prefix_stripped_for_cost_lookup(): """The mantle/ route token is a routing prefix like openai/, so a bedrock/mantle/ deployment must resolve the bare Bedrock model for cost lookup while still routing to Mantle.""" - from litellm.llms.bedrock.common_utils import get_bedrock_base_model, strip_bedrock_routing_prefix assert strip_bedrock_routing_prefix("mantle/anthropic.claude-sonnet-5") == "anthropic.claude-sonnet-5" assert get_bedrock_base_model("bedrock/mantle/anthropic.claude-sonnet-5") == "anthropic.claude-sonnet-5" @@ -417,7 +414,6 @@ def test_capability_lookups_fall_back_to_base_model_when_regional_entry_lacks_fi must not shadow a base entry that has it (`get(model) or get(base)` used to short-circuit on the truthy regional dict and drop the capability). """ - import litellm from litellm.llms.bedrock.common_utils import ( bedrock_converse_supports_parallel_tool_use_config, is_claude_4_5_on_bedrock, @@ -543,7 +539,6 @@ def test_apply_structured_output_prefers_legacy_output_format(local_model_cost_m def test_sign_aws_request_assumes_role_with_external_id(monkeypatch): """A trust policy requiring sts:ExternalId must be satisfied when signing batch API requests.""" import datetime - from unittest.mock import patch import boto3 from botocore.exceptions import ClientError @@ -596,7 +591,6 @@ def test_sign_aws_request_assumes_role_with_external_id(monkeypatch): def test_sign_aws_request_assumes_role_with_session_tags(monkeypatch): """Batch and file signing must carry the deployment's session tags into the AssumeRole call too.""" import datetime - from unittest.mock import patch import boto3 from botocore.exceptions import ClientError @@ -855,7 +849,6 @@ def test_bedrock_mantle_get_error_class_keeps_provider_headers(config): def _bedrock_configs_with_get_error_class(): - import importlib import inspect import pathlib @@ -940,7 +933,6 @@ def test_unmapped_openai_family_model_routes_to_converse(): """ from typing import Final - import litellm unmapped: Final = "bedrock/global.openai.gpt-99-unmapped" assert unmapped.removeprefix("bedrock/") not in litellm.bedrock_converse_models diff --git a/tests/unit/test_constants.py b/tests/unit/test_constants.py index 21b75ceed76..e926f258295 100644 --- a/tests/unit/test_constants.py +++ b/tests/unit/test_constants.py @@ -1,7 +1,8 @@ -import sys import ast +import importlib import inspect import json +import sys from unittest import mock import httpx @@ -9,9 +10,6 @@ import pytest import respx from fastapi.testclient import TestClient - -import importlib - import litellm from litellm import constants diff --git a/tests/unit/test_utils.py b/tests/unit/test_utils.py index fb58edd8840..2e0e7c76d76 100644 --- a/tests/unit/test_utils.py +++ b/tests/unit/test_utils.py @@ -614,7 +614,6 @@ def test_all_model_configs(): def test_cohere_embedding_optional_params(): - from litellm import get_optional_params_embeddings optional_params = get_optional_params_embeddings( model="embed-v4.0",