mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-19 00:01:29 +00:00
refactor(proxy): read ModelResponse off the litellm package in key health
CodeQL flags the module-level import of ModelResponse from litellm.types.utils as part of a cyclic import; the isinstance check now goes through the already-imported litellm package like the other proxy hooks do. Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
parent
ba9e47e684
commit
cd322fafbe
1 changed files with 3 additions and 2 deletions
|
|
@ -153,7 +153,6 @@ from litellm.types.proxy.management_endpoints.key_management_endpoints import (
|
|||
from litellm.types.router import Deployment
|
||||
from litellm.types.utils import (
|
||||
BudgetConfig,
|
||||
ModelResponse,
|
||||
PersonalUIKeyGenerationConfig,
|
||||
TeamUIKeyGenerationConfig,
|
||||
)
|
||||
|
|
@ -7205,7 +7204,9 @@ async def test_key_logging(
|
|||
await asyncio.sleep(2) # wait for callbacks to run, callbacks use batching so wait for the flush event
|
||||
callback_log_contents: Final = log_capture_string.getvalue()
|
||||
|
||||
health_check_event_id: Final = health_check_response.id if isinstance(health_check_response, ModelResponse) else ""
|
||||
health_check_event_id: Final = (
|
||||
health_check_response.id if isinstance(health_check_response, litellm.ModelResponse) else ""
|
||||
)
|
||||
gcs_failure: Final = (
|
||||
await flush_gcs_and_describe_failures(get_custom_logger_compatible_class("gcs_bucket"), health_check_event_id)
|
||||
if "gcs_bucket" in logging_callbacks
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue