(proxy) test budgets

This commit is contained in:
ishaan-jaff 2024-03-02 16:57:35 -08:00
parent d72c195bf6
commit 9bc1f5f664

View file

@ -6513,12 +6513,9 @@ async def health_services_endpoint(
},
)
if "slack" in general_settings.get("alerting", []):
test_message = f"""\n🚨 `ProjectedLimitExceededError` 💸\n\n`Key Alias:` my-secret-project \n`Expected Day of Error`: 28th March \n`Current Spend`: 100 \n`Projected Spend at end of month`: 1000 \n"""
await proxy_logging_obj.alerting_handler(
message=test_message, level="Low"
)
test_message = f"""\n🚨 `ProjectedLimitExceededError` 💸\n\n`Key Alias:` litellm-ui-test-alert \n`Expected Day of Error`: 28th March \n`Current Spend`: $100.00 \n`Projected Spend at end of month`: $1000.00 \n"""
await proxy_logging_obj.alerting_handler(message=test_message, level="Low")
else:
raise HTTPException(
status_code=422,
@ -6541,6 +6538,8 @@ async def health_services_endpoint(
type="auth_error",
param=getattr(e, "param", "None"),
code=status.HTTP_401_UNAUTHORIZED,
)
@router.get("/health", tags=["health"], dependencies=[Depends(user_api_key_auth)])
async def health_endpoint(