mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-15 23:31:29 +00:00
fix(router): import retry helpers inside their functions to break CodeQL import cycles
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
parent
5d0a6e3a78
commit
10be7e01d4
2 changed files with 5 additions and 2 deletions
|
|
@ -241,7 +241,6 @@ from litellm.types.router import (
|
|||
ModelGroupInfo,
|
||||
OptionalPreCallChecks,
|
||||
PreRoutingStrategy,
|
||||
RetryAttemptRecord,
|
||||
RetryPolicy,
|
||||
RouterCacheEnum,
|
||||
RouterErrors,
|
||||
|
|
@ -8362,6 +8361,8 @@ class Router:
|
|||
"""
|
||||
When a retry or fallback happens, record which model group, deployment and attempt just failed and why
|
||||
"""
|
||||
from litellm.types.router import RetryAttemptRecord
|
||||
|
||||
_metadata_var: Final = "litellm_metadata" if "litellm_metadata" in kwargs else "metadata"
|
||||
request_metadata: Final[Mapping[str, object]] = kwargs[_metadata_var]
|
||||
model_group: Final = kwargs.get("model")
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ from litellm.constants import (
|
|||
PROVIDERS_THAT_AUTHENTICATE_ON_PROVIDER_INFO,
|
||||
TOOL_CHOICE_OBJECT_TOKEN_COUNT,
|
||||
)
|
||||
from litellm.litellm_core_utils.core_helpers import max_retries_per_request_hit, normalize_drop_params
|
||||
from litellm.litellm_core_utils.core_helpers import normalize_drop_params
|
||||
from litellm.litellm_core_utils.fallback_generalizations import (
|
||||
match_capability_generalizations,
|
||||
)
|
||||
|
|
@ -1500,6 +1500,8 @@ def post_call_processing(
|
|||
|
||||
|
||||
def client(original_function):
|
||||
from litellm.litellm_core_utils.core_helpers import max_retries_per_request_hit
|
||||
|
||||
Rules: Final = litellm_utils.Rules
|
||||
rules_obj: Final = Rules()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue