(core sdk fix) - fix fallbacks stuck in infinite loop (#7751)

* test_acompletion_fallbacks_basic

* use common run_async_function

* fix completion_with_fallbacks

* fix completion with fallbacks

* fix fallback utils

* test_acompletion_fallbacks_basic

* test_completion_fallbacks_sync

* huggingface/mistralai/Mistral-7B-Instruct-v0.3
This commit is contained in:
Ishaan Jaff 2025-01-13 19:34:34 -08:00 committed by GitHub
parent a66fd515bb
commit 392eb265f9
6 changed files with 222 additions and 156 deletions

View file

@ -75,9 +75,7 @@ from litellm.utils import (
CustomStreamWrapper,
ProviderConfigManager,
Usage,
async_completion_with_fallbacks,
async_mock_completion_streaming_obj,
completion_with_fallbacks,
convert_to_model_response_object,
create_pretrained_tokenizer,
create_tokenizer,
@ -98,6 +96,10 @@ from litellm.utils import (
from ._logging import verbose_logger
from .caching.caching import disable_cache, enable_cache, update_cache
from .litellm_core_utils.fallback_utils import (
async_completion_with_fallbacks,
completion_with_fallbacks,
)
from .litellm_core_utils.prompt_templates.common_utils import get_completion_messages
from .litellm_core_utils.prompt_templates.factory import (
custom_prompt,