From d6271ceefbd5073a29d05193900696b79ba4bd98 Mon Sep 17 00:00:00 2001 From: Ishaan Jaffer Date: Thu, 6 Nov 2025 19:11:19 -0800 Subject: [PATCH] test fixes mock tests --- litellm/llms/xai/responses/transformation.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/litellm/llms/xai/responses/transformation.py b/litellm/llms/xai/responses/transformation.py index bd422c8d81e..5bb6c9a9559 100644 --- a/litellm/llms/xai/responses/transformation.py +++ b/litellm/llms/xai/responses/transformation.py @@ -1,6 +1,5 @@ from typing import TYPE_CHECKING, Any, Dict, List, Optional -import litellm from litellm._logging import verbose_logger from litellm.llms.openai.responses.transformation import OpenAIResponsesAPIConfig from litellm.secret_managers.main import get_secret_str @@ -102,6 +101,8 @@ class XAIResponsesAPIConfig(OpenAIResponsesAPIConfig): Uses XAI_API_KEY from environment or litellm_params. """ + import litellm + litellm_params = litellm_params or GenericLiteLLMParams() api_key = ( litellm_params.api_key @@ -132,6 +133,8 @@ class XAIResponsesAPIConfig(OpenAIResponsesAPIConfig): Returns: str: The full URL for the XAI /responses endpoint """ + import litellm + api_base = ( api_base or litellm.api_base