From a69d40e11eed6072be1d5e9b80240f2463406b75 Mon Sep 17 00:00:00 2001 From: kris3984 Date: Sat, 22 Aug 2026 22:42:18 +0530 Subject: [PATCH] fix(tests): re-export _pydantic_model_json_schema in utils to resolve test import error --- litellm/utils.py | 1 + tests/test_litellm/test_pydantic_validation.py | 6 ++---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/litellm/utils.py b/litellm/utils.py index a50a7be3c9e..be722beff90 100644 --- a/litellm/utils.py +++ b/litellm/utils.py @@ -242,6 +242,7 @@ from litellm import utils as litellm_utils # These are lazy loaded via __getattr__ from litellm.llms.base_llm.base_utils import ( BaseLLMModelInfo, + _pydantic_model_json_schema, type_to_response_format_param, ) diff --git a/tests/test_litellm/test_pydantic_validation.py b/tests/test_litellm/test_pydantic_validation.py index 1148217ce9a..5be0a70288d 100644 --- a/tests/test_litellm/test_pydantic_validation.py +++ b/tests/test_litellm/test_pydantic_validation.py @@ -5,10 +5,7 @@ import pytest from pydantic import BaseModel, field_validator import litellm -from litellm.llms.base_llm.base_utils import ( - _pydantic_model_json_schema, - type_to_response_format_param, -) +from litellm.llms.base_llm.base_utils import type_to_response_format_param from litellm.types.utils import LlmProviders, ModelResponse from litellm.utils import ( ProviderConfigManager, @@ -16,6 +13,7 @@ from litellm.utils import ( _apply_response_format_validation, _is_basemodel_class, _is_pydantic_basemodel_type, + _pydantic_model_json_schema, _should_preserve_pydantic_response_format, normalize_completion_response_format, post_call_processing,