litellm-enterprise 0.1.14__tar.gz → 0.1.16__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (133) hide show
  1. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/PKG-INFO +1 -1
  2. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/enterprise_callbacks/callback_controls.py +32 -6
  3. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/integrations/prometheus.py +23 -4
  4. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/proxy/common_utils/check_batch_cost.py +20 -7
  5. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/proxy/vector_stores/endpoints.py +92 -4
  6. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/pyproject.toml +2 -2
  7. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/LICENSE.md +0 -0
  8. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/README.md +0 -0
  9. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/__init__.py +0 -0
  10. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/enterprise_callbacks/example_logging_api.py +0 -0
  11. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/enterprise_callbacks/generic_api_callback.py +0 -0
  12. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/enterprise_callbacks/llama_guard.py +0 -0
  13. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/enterprise_callbacks/llm_guard.py +0 -0
  14. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/enterprise_callbacks/pagerduty/pagerduty.py +0 -0
  15. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/enterprise_callbacks/secret_detection.py +0 -0
  16. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/enterprise_callbacks/secrets_plugins/__init__.py +0 -0
  17. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/enterprise_callbacks/secrets_plugins/adafruit.py +0 -0
  18. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/enterprise_callbacks/secrets_plugins/adobe.py +0 -0
  19. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/enterprise_callbacks/secrets_plugins/age_secret_key.py +0 -0
  20. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/enterprise_callbacks/secrets_plugins/airtable_api_key.py +0 -0
  21. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/enterprise_callbacks/secrets_plugins/algolia_api_key.py +0 -0
  22. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/enterprise_callbacks/secrets_plugins/alibaba.py +0 -0
  23. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/enterprise_callbacks/secrets_plugins/asana.py +0 -0
  24. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/enterprise_callbacks/secrets_plugins/atlassian_api_token.py +0 -0
  25. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/enterprise_callbacks/secrets_plugins/authress_access_key.py +0 -0
  26. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/enterprise_callbacks/secrets_plugins/beamer_api_token.py +0 -0
  27. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/enterprise_callbacks/secrets_plugins/bitbucket.py +0 -0
  28. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/enterprise_callbacks/secrets_plugins/bittrex.py +0 -0
  29. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/enterprise_callbacks/secrets_plugins/clojars_api_token.py +0 -0
  30. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/enterprise_callbacks/secrets_plugins/codecov_access_token.py +0 -0
  31. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/enterprise_callbacks/secrets_plugins/coinbase_access_token.py +0 -0
  32. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/enterprise_callbacks/secrets_plugins/confluent.py +0 -0
  33. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/enterprise_callbacks/secrets_plugins/contentful_api_token.py +0 -0
  34. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/enterprise_callbacks/secrets_plugins/databricks_api_token.py +0 -0
  35. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/enterprise_callbacks/secrets_plugins/datadog_access_token.py +0 -0
  36. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/enterprise_callbacks/secrets_plugins/defined_networking_api_token.py +0 -0
  37. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/enterprise_callbacks/secrets_plugins/digitalocean.py +0 -0
  38. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/enterprise_callbacks/secrets_plugins/discord.py +0 -0
  39. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/enterprise_callbacks/secrets_plugins/doppler_api_token.py +0 -0
  40. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/enterprise_callbacks/secrets_plugins/droneci_access_token.py +0 -0
  41. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/enterprise_callbacks/secrets_plugins/dropbox.py +0 -0
  42. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/enterprise_callbacks/secrets_plugins/duffel_api_token.py +0 -0
  43. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/enterprise_callbacks/secrets_plugins/dynatrace_api_token.py +0 -0
  44. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/enterprise_callbacks/secrets_plugins/easypost.py +0 -0
  45. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/enterprise_callbacks/secrets_plugins/etsy_access_token.py +0 -0
  46. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/enterprise_callbacks/secrets_plugins/facebook_access_token.py +0 -0
  47. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/enterprise_callbacks/secrets_plugins/fastly_api_token.py +0 -0
  48. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/enterprise_callbacks/secrets_plugins/finicity.py +0 -0
  49. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/enterprise_callbacks/secrets_plugins/finnhub_access_token.py +0 -0
  50. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/enterprise_callbacks/secrets_plugins/flickr_access_token.py +0 -0
  51. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/enterprise_callbacks/secrets_plugins/flutterwave.py +0 -0
  52. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/enterprise_callbacks/secrets_plugins/frameio_api_token.py +0 -0
  53. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/enterprise_callbacks/secrets_plugins/freshbooks_access_token.py +0 -0
  54. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/enterprise_callbacks/secrets_plugins/gcp_api_key.py +0 -0
  55. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/enterprise_callbacks/secrets_plugins/github_token.py +0 -0
  56. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/enterprise_callbacks/secrets_plugins/gitlab.py +0 -0
  57. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/enterprise_callbacks/secrets_plugins/gitter_access_token.py +0 -0
  58. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/enterprise_callbacks/secrets_plugins/gocardless_api_token.py +0 -0
  59. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/enterprise_callbacks/secrets_plugins/grafana.py +0 -0
  60. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/enterprise_callbacks/secrets_plugins/hashicorp_tf_api_token.py +0 -0
  61. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/enterprise_callbacks/secrets_plugins/heroku_api_key.py +0 -0
  62. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/enterprise_callbacks/secrets_plugins/hubspot_api_key.py +0 -0
  63. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/enterprise_callbacks/secrets_plugins/huggingface.py +0 -0
  64. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/enterprise_callbacks/secrets_plugins/intercom_api_key.py +0 -0
  65. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/enterprise_callbacks/secrets_plugins/jfrog.py +0 -0
  66. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/enterprise_callbacks/secrets_plugins/jwt.py +0 -0
  67. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/enterprise_callbacks/secrets_plugins/kraken_access_token.py +0 -0
  68. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/enterprise_callbacks/secrets_plugins/kucoin.py +0 -0
  69. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/enterprise_callbacks/secrets_plugins/launchdarkly_access_token.py +0 -0
  70. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/enterprise_callbacks/secrets_plugins/linear.py +0 -0
  71. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/enterprise_callbacks/secrets_plugins/linkedin.py +0 -0
  72. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/enterprise_callbacks/secrets_plugins/lob.py +0 -0
  73. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/enterprise_callbacks/secrets_plugins/mailgun.py +0 -0
  74. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/enterprise_callbacks/secrets_plugins/mapbox_api_token.py +0 -0
  75. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/enterprise_callbacks/secrets_plugins/mattermost_access_token.py +0 -0
  76. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/enterprise_callbacks/secrets_plugins/messagebird.py +0 -0
  77. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/enterprise_callbacks/secrets_plugins/microsoft_teams_webhook.py +0 -0
  78. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/enterprise_callbacks/secrets_plugins/netlify_access_token.py +0 -0
  79. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/enterprise_callbacks/secrets_plugins/new_relic.py +0 -0
  80. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/enterprise_callbacks/secrets_plugins/nytimes_access_token.py +0 -0
  81. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/enterprise_callbacks/secrets_plugins/okta_access_token.py +0 -0
  82. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/enterprise_callbacks/secrets_plugins/openai_api_key.py +0 -0
  83. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/enterprise_callbacks/secrets_plugins/planetscale.py +0 -0
  84. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/enterprise_callbacks/secrets_plugins/postman_api_token.py +0 -0
  85. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/enterprise_callbacks/secrets_plugins/prefect_api_token.py +0 -0
  86. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/enterprise_callbacks/secrets_plugins/pulumi_api_token.py +0 -0
  87. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/enterprise_callbacks/secrets_plugins/pypi_upload_token.py +0 -0
  88. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/enterprise_callbacks/secrets_plugins/rapidapi_access_token.py +0 -0
  89. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/enterprise_callbacks/secrets_plugins/readme_api_token.py +0 -0
  90. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/enterprise_callbacks/secrets_plugins/rubygems_api_token.py +0 -0
  91. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/enterprise_callbacks/secrets_plugins/scalingo_api_token.py +0 -0
  92. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/enterprise_callbacks/secrets_plugins/sendbird.py +0 -0
  93. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/enterprise_callbacks/secrets_plugins/sendgrid_api_token.py +0 -0
  94. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/enterprise_callbacks/secrets_plugins/sendinblue_api_token.py +0 -0
  95. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/enterprise_callbacks/secrets_plugins/sentry_access_token.py +0 -0
  96. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/enterprise_callbacks/secrets_plugins/shippo_api_token.py +0 -0
  97. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/enterprise_callbacks/secrets_plugins/shopify.py +0 -0
  98. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/enterprise_callbacks/secrets_plugins/slack.py +0 -0
  99. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/enterprise_callbacks/secrets_plugins/snyk_api_token.py +0 -0
  100. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/enterprise_callbacks/secrets_plugins/squarespace_access_token.py +0 -0
  101. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/enterprise_callbacks/secrets_plugins/sumologic.py +0 -0
  102. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/enterprise_callbacks/secrets_plugins/telegram_bot_api_token.py +0 -0
  103. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/enterprise_callbacks/secrets_plugins/travisci_access_token.py +0 -0
  104. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/enterprise_callbacks/secrets_plugins/twitch_api_token.py +0 -0
  105. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/enterprise_callbacks/secrets_plugins/twitter.py +0 -0
  106. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/enterprise_callbacks/secrets_plugins/typeform_api_token.py +0 -0
  107. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/enterprise_callbacks/secrets_plugins/vault.py +0 -0
  108. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/enterprise_callbacks/secrets_plugins/yandex.py +0 -0
  109. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/enterprise_callbacks/secrets_plugins/zendesk_secret_key.py +0 -0
  110. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/enterprise_callbacks/send_emails/base_email.py +0 -0
  111. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/enterprise_callbacks/send_emails/endpoints.py +0 -0
  112. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/enterprise_callbacks/send_emails/resend_email.py +0 -0
  113. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/enterprise_callbacks/send_emails/smtp_email.py +0 -0
  114. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/enterprise_callbacks/session_handler.py +0 -0
  115. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/integrations/custom_guardrail.py +0 -0
  116. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/litellm_core_utils/litellm_logging.py +0 -0
  117. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/proxy/audit_logging_endpoints.py +0 -0
  118. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/proxy/auth/__init__.py +0 -0
  119. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/proxy/auth/custom_sso_handler.py +0 -0
  120. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/proxy/auth/route_checks.py +0 -0
  121. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/proxy/auth/user_api_key_auth.py +0 -0
  122. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/proxy/enterprise_routes.py +0 -0
  123. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/proxy/guardrails/endpoints.py +0 -0
  124. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/proxy/hooks/managed_files.py +0 -0
  125. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/proxy/management_endpoints/__init__.py +0 -0
  126. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/proxy/management_endpoints/internal_user_endpoints.py +0 -0
  127. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/proxy/management_endpoints/key_management_endpoints.py +0 -0
  128. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/proxy/proxy_server.py +0 -0
  129. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/proxy/readme.md +0 -0
  130. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/proxy/utils.py +0 -0
  131. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/types/enterprise_callbacks/send_emails.py +0 -0
  132. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/types/proxy/audit_logging_endpoints.py +0 -0
  133. {litellm_enterprise-0.1.14 → litellm_enterprise-0.1.16}/litellm_enterprise/types/proxy/proxy_server.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: litellm-enterprise
3
- Version: 0.1.14
3
+ Version: 0.1.16
4
4
  Summary: Package for LiteLLM Enterprise features
5
5
  Author: BerriAI
6
6
  Requires-Python: >=3.8, !=2.7.*, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*, !=3.6.*, !=3.7.*
@@ -1,3 +1,5 @@
1
+ from typing import List, Optional
2
+
1
3
  import litellm
2
4
  from litellm._logging import verbose_logger
3
5
  from litellm.constants import X_LITELLM_DISABLE_CALLBACKS
@@ -6,15 +8,18 @@ from litellm.litellm_core_utils.llm_request_utils import (
6
8
  get_proxy_server_request_headers,
7
9
  )
8
10
  from litellm.proxy._types import CommonProxyErrors
11
+ from litellm.types.utils import StandardCallbackDynamicParams
9
12
 
10
13
 
11
14
  class EnterpriseCallbackControls:
12
15
  @staticmethod
13
- def is_callback_disabled_via_headers(
14
- callback: litellm.CALLBACK_TYPES, litellm_params: dict
16
+ def is_callback_disabled_dynamically(
17
+ callback: litellm.CALLBACK_TYPES,
18
+ litellm_params: dict,
19
+ standard_callback_dynamic_params: StandardCallbackDynamicParams
15
20
  ) -> bool:
16
21
  """
17
- Check if a callback is disabled via the x-litellm-disable-callbacks header.
22
+ Check if a callback is disabled via the x-litellm-disable-callbacks header or via `litellm_disabled_callbacks` in standard_callback_dynamic_params.
18
23
 
19
24
  Args:
20
25
  callback: The callback to check (can be string, CustomLogger instance, or callable)
@@ -28,8 +33,7 @@ class EnterpriseCallbackControls:
28
33
  )
29
34
 
30
35
  try:
31
- request_headers = get_proxy_server_request_headers(litellm_params)
32
- disabled_callbacks = request_headers.get(X_LITELLM_DISABLE_CALLBACKS, None)
36
+ disabled_callbacks = EnterpriseCallbackControls.get_disabled_callbacks(litellm_params, standard_callback_dynamic_params)
33
37
  verbose_logger.debug(f"Dynamically disabled callbacks from {X_LITELLM_DISABLE_CALLBACKS}: {disabled_callbacks}")
34
38
  verbose_logger.debug(f"Checking if {callback} is disabled via headers. Disable callbacks from headers: {disabled_callbacks}")
35
39
  if disabled_callbacks is not None:
@@ -39,7 +43,6 @@ class EnterpriseCallbackControls:
39
43
  if not EnterpriseCallbackControls._premium_user_check():
40
44
  return False
41
45
  #########################################################
42
- disabled_callbacks = set([cb.strip().lower() for cb in disabled_callbacks.split(",")])
43
46
  if isinstance(callback, str):
44
47
  if callback.lower() in disabled_callbacks:
45
48
  verbose_logger.debug(f"Not logging to {callback} because it is disabled via {X_LITELLM_DISABLE_CALLBACKS}")
@@ -56,6 +59,29 @@ class EnterpriseCallbackControls:
56
59
  f"Error checking disabled callbacks header: {str(e)}"
57
60
  )
58
61
  return False
62
+ @staticmethod
63
+ def get_disabled_callbacks(litellm_params: dict, standard_callback_dynamic_params: StandardCallbackDynamicParams) -> Optional[List[str]]:
64
+ """
65
+ Get the disabled callbacks from the standard callback dynamic params.
66
+ """
67
+
68
+ #########################################################
69
+ # check if disabled via headers
70
+ #########################################################
71
+ request_headers = get_proxy_server_request_headers(litellm_params)
72
+ disabled_callbacks = request_headers.get(X_LITELLM_DISABLE_CALLBACKS, None)
73
+ if disabled_callbacks is not None:
74
+ disabled_callbacks = set([cb.strip().lower() for cb in disabled_callbacks.split(",")])
75
+ return list(disabled_callbacks)
76
+
77
+
78
+ #########################################################
79
+ # check if disabled via request body
80
+ #########################################################
81
+ if standard_callback_dynamic_params.get("litellm_disabled_callbacks", None) is not None:
82
+ return standard_callback_dynamic_params.get("litellm_disabled_callbacks", None)
83
+
84
+ return None
59
85
 
60
86
  @staticmethod
61
87
  def _premium_user_check():
@@ -1,4 +1,4 @@
1
- # used for /metrics endpoint on LiteLLM Proxy
1
+ # used for /metrics endpoint on LiteLLM Proxy
2
2
  #### What this does ####
3
3
  # On success, log events to Prometheus
4
4
  import sys
@@ -1231,8 +1231,15 @@ class PrometheusLogger(CustomLogger):
1231
1231
  "team_alias",
1232
1232
  ] + EXCEPTION_LABELS,
1233
1233
  """
1234
+ from litellm.litellm_core_utils.litellm_logging import (
1235
+ StandardLoggingPayloadSetup,
1236
+ )
1237
+
1234
1238
  try:
1235
- _tags = cast(List[str], request_data.get("tags") or [])
1239
+ _tags = StandardLoggingPayloadSetup._get_request_tags(
1240
+ request_data.get("metadata", {}),
1241
+ request_data.get("proxy_server_request", {}),
1242
+ )
1236
1243
  enum_values = UserAPIKeyLabelValues(
1237
1244
  end_user=user_api_key_dict.end_user_id,
1238
1245
  user=user_api_key_dict.user_id,
@@ -1277,6 +1284,10 @@ class PrometheusLogger(CustomLogger):
1277
1284
  Proxy level tracking - triggered when the proxy responds with a success response to the client
1278
1285
  """
1279
1286
  try:
1287
+ from litellm.litellm_core_utils.litellm_logging import (
1288
+ StandardLoggingPayloadSetup,
1289
+ )
1290
+
1280
1291
  enum_values = UserAPIKeyLabelValues(
1281
1292
  end_user=user_api_key_dict.end_user_id,
1282
1293
  hashed_api_key=user_api_key_dict.api_key,
@@ -1288,6 +1299,9 @@ class PrometheusLogger(CustomLogger):
1288
1299
  user_email=user_api_key_dict.user_email,
1289
1300
  status_code="200",
1290
1301
  route=user_api_key_dict.request_route,
1302
+ tags=StandardLoggingPayloadSetup._get_request_tags(
1303
+ data.get("metadata", {}), data.get("proxy_server_request", {})
1304
+ ),
1291
1305
  )
1292
1306
  _labels = prometheus_label_factory(
1293
1307
  supported_enum_labels=self.get_labels_for_metric(
@@ -1352,6 +1366,7 @@ class PrometheusLogger(CustomLogger):
1352
1366
  team_alias=standard_logging_payload["metadata"][
1353
1367
  "user_api_key_team_alias"
1354
1368
  ],
1369
+ tags=standard_logging_payload.get("request_tags", []),
1355
1370
  )
1356
1371
 
1357
1372
  """
@@ -2148,9 +2163,11 @@ class PrometheusLogger(CustomLogger):
2148
2163
 
2149
2164
  It emits the current remaining budget metrics for all Keys and Teams.
2150
2165
  """
2166
+ from enterprise.litellm_enterprise.integrations.prometheus import (
2167
+ PrometheusLogger,
2168
+ )
2151
2169
  from litellm.constants import PROMETHEUS_BUDGET_METRICS_REFRESH_INTERVAL_MINUTES
2152
2170
  from litellm.integrations.custom_logger import CustomLogger
2153
- from enterprise.litellm_enterprise.integrations.prometheus import PrometheusLogger
2154
2171
 
2155
2172
  prometheus_loggers: List[CustomLogger] = (
2156
2173
  litellm.logging_callback_manager.get_custom_loggers_for_type(
@@ -2280,6 +2297,8 @@ def get_custom_labels_from_tags(tags: List[str]) -> Dict[str, str]:
2280
2297
  """
2281
2298
  Get custom labels from tags based on admin configuration
2282
2299
  """
2300
+ from litellm.types.integrations.prometheus import _sanitize_prometheus_label_name
2301
+
2283
2302
  configured_tags = litellm.custom_prometheus_tags
2284
2303
  if configured_tags is None or len(configured_tags) == 0:
2285
2304
  return {}
@@ -2289,7 +2308,7 @@ def get_custom_labels_from_tags(tags: List[str]) -> Dict[str, str]:
2289
2308
  # Map each configured tag to its presence in the request tags
2290
2309
  for configured_tag in configured_tags:
2291
2310
  # Create a safe prometheus label name
2292
- label_name = f"tag_{configured_tag}".replace("-", "_").replace(".", "_")
2311
+ label_name = _sanitize_prometheus_label_name(f"tag_{configured_tag}")
2293
2312
 
2294
2313
  # Check if this tag is present in the request tags
2295
2314
  if configured_tag in tags:
@@ -83,15 +83,25 @@ class CheckBatchCost:
83
83
  )
84
84
  continue
85
85
 
86
- response = await self.llm_router.aretrieve_batch(
87
- model=model_id,
88
- batch_id=batch_id,
89
- litellm_metadata={
90
- "user_api_key_user_id": job.created_by or "default-user-id",
91
- "batch_ignore_default_logging": True,
92
- },
86
+ verbose_proxy_logger.info(
87
+ f"Querying model ID: {model_id} for cost and usage of batch ID: {batch_id}"
93
88
  )
94
89
 
90
+ try:
91
+ response = await self.llm_router.aretrieve_batch(
92
+ model=model_id,
93
+ batch_id=batch_id,
94
+ litellm_metadata={
95
+ "user_api_key_user_id": job.created_by or "default-user-id",
96
+ "batch_ignore_default_logging": True,
97
+ },
98
+ )
99
+ except Exception as e:
100
+ verbose_proxy_logger.info(
101
+ f"Skipping job {unified_object_id} because of error querying model ID: {model_id} for cost and usage of batch ID: {batch_id}: {e}"
102
+ )
103
+ continue
104
+
95
105
  ## RETRIEVE THE BATCH JOB OUTPUT FILE
96
106
  managed_files_obj = cast(
97
107
  Optional[_PROXY_LiteLLMManagedFiles],
@@ -102,6 +112,9 @@ class CheckBatchCost:
102
112
  and response.output_file_id is not None
103
113
  and managed_files_obj is not None
104
114
  ):
115
+ verbose_proxy_logger.info(
116
+ f"Batch ID: {batch_id} is complete, tracking cost and usage"
117
+ )
105
118
  # track cost
106
119
  model_file_id_mapping = {
107
120
  response.output_file_id: {model_id: response.output_file_id}
@@ -9,9 +9,9 @@ All /vector_store management endpoints
9
9
  """
10
10
 
11
11
  import copy
12
- from typing import List
12
+ from typing import List, Optional
13
13
 
14
- from fastapi import APIRouter, Depends, HTTPException
14
+ from fastapi import APIRouter, Depends, HTTPException, Request, Response
15
15
 
16
16
  import litellm
17
17
  from litellm._logging import verbose_proxy_logger
@@ -22,12 +22,16 @@ from litellm.types.vector_stores import (
22
22
  LiteLLM_ManagedVectorStore,
23
23
  LiteLLM_ManagedVectorStoreListResponse,
24
24
  VectorStoreDeleteRequest,
25
+ VectorStoreInfoRequest,
26
+ VectorStoreUpdateRequest,
25
27
  )
26
28
  from litellm.vector_stores.vector_store_registry import VectorStoreRegistry
27
29
 
28
30
  router = APIRouter()
29
31
 
30
-
32
+ ########################################################
33
+ # Management Endpoints
34
+ ########################################################
31
35
  @router.post(
32
36
  "/vector_store/new",
33
37
  tags=["vector store management"],
@@ -48,6 +52,7 @@ async def new_vector_store(
48
52
  - vector_store_metadata: Optional[Dict] - Additional metadata for the vector store
49
53
  """
50
54
  from litellm.proxy.proxy_server import prisma_client
55
+ from litellm.types.router import GenericLiteLLMParams
51
56
 
52
57
  if prisma_client is None:
53
58
  raise HTTPException(status_code=500, detail="Database not connected")
@@ -70,9 +75,20 @@ async def new_vector_store(
70
75
  vector_store.get("vector_store_metadata")
71
76
  )
72
77
 
78
+ # Safely handle JSON serialization of litellm_params
79
+ litellm_params_json: Optional[str] = None
80
+ _input_litellm_params: dict = vector_store.get("litellm_params", {}) or {}
81
+ if _input_litellm_params is not None:
82
+ litellm_params_dict = GenericLiteLLMParams(**_input_litellm_params).model_dump(exclude_none=True)
83
+ litellm_params_json = safe_dumps(litellm_params_dict)
84
+ del vector_store["litellm_params"]
85
+
73
86
  _new_vector_store = (
74
87
  await prisma_client.db.litellm_managedvectorstorestable.create(
75
- data=vector_store
88
+ data={
89
+ **vector_store,
90
+ "litellm_params": litellm_params_json,
91
+ }
76
92
  )
77
93
  )
78
94
 
@@ -205,3 +221,75 @@ async def delete_vector_store(
205
221
  return {"message": f"Vector store {data.vector_store_id} deleted successfully"}
206
222
  except Exception as e:
207
223
  raise HTTPException(status_code=500, detail=str(e))
224
+
225
+
226
+ @router.post(
227
+ "/vector_store/info",
228
+ tags=["vector store management"],
229
+ dependencies=[Depends(user_api_key_auth)],
230
+ )
231
+ async def get_vector_store_info(
232
+ data: VectorStoreInfoRequest,
233
+ user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth),
234
+ ):
235
+ """Return a single vector store's details"""
236
+ from litellm.proxy.proxy_server import prisma_client
237
+
238
+ if prisma_client is None:
239
+ raise HTTPException(status_code=500, detail="Database not connected")
240
+
241
+ try:
242
+ vector_store = await prisma_client.db.litellm_managedvectorstorestable.find_unique(
243
+ where={"vector_store_id": data.vector_store_id}
244
+ )
245
+ if vector_store is None:
246
+ raise HTTPException(
247
+ status_code=404,
248
+ detail=f"Vector store with ID {data.vector_store_id} not found",
249
+ )
250
+
251
+ vector_store_dict = vector_store.model_dump()
252
+ return {"vector_store": vector_store_dict}
253
+ except Exception as e:
254
+ verbose_proxy_logger.exception(f"Error getting vector store info: {str(e)}")
255
+ raise HTTPException(status_code=500, detail=str(e))
256
+
257
+
258
+ @router.post(
259
+ "/vector_store/update",
260
+ tags=["vector store management"],
261
+ dependencies=[Depends(user_api_key_auth)],
262
+ )
263
+ async def update_vector_store(
264
+ data: VectorStoreUpdateRequest,
265
+ user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth),
266
+ ):
267
+ """Update vector store details"""
268
+ from litellm.proxy.proxy_server import prisma_client
269
+
270
+ if prisma_client is None:
271
+ raise HTTPException(status_code=500, detail="Database not connected")
272
+
273
+ try:
274
+ update_data = data.model_dump(exclude_unset=True)
275
+ vector_store_id = update_data.pop("vector_store_id")
276
+ if update_data.get("vector_store_metadata") is not None:
277
+ update_data["vector_store_metadata"] = safe_dumps(update_data["vector_store_metadata"])
278
+
279
+ updated = await prisma_client.db.litellm_managedvectorstorestable.update(
280
+ where={"vector_store_id": vector_store_id},
281
+ data=update_data,
282
+ )
283
+
284
+ updated_vs = LiteLLM_ManagedVectorStore(**updated.model_dump())
285
+
286
+ if litellm.vector_store_registry is not None:
287
+ litellm.vector_store_registry.update_vector_store_in_registry(
288
+ vector_store_id=vector_store_id,
289
+ updated_data=updated_vs,
290
+ )
291
+
292
+ return {"vector_store": updated_vs}
293
+ except Exception as e:
294
+ verbose_proxy_logger.exception(f"Error updating vector store: {str(e)}")
295
+ raise HTTPException(status_code=500, detail=str(e))
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "litellm-enterprise"
3
- version = "0.1.14"
3
+ version = "0.1.16"
4
4
  description = "Package for LiteLLM Enterprise features"
5
5
  authors = ["BerriAI"]
6
6
  readme = "README.md"
@@ -22,7 +22,7 @@ requires = ["poetry-core"]
22
22
  build-backend = "poetry.core.masonry.api"
23
23
 
24
24
  [tool.commitizen]
25
- version = "0.1.14"
25
+ version = "0.1.16"
26
26
  version_files = [
27
27
  "pyproject.toml:version",
28
28
  "../requirements.txt:litellm-enterprise==",