mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-26 19:24:27 +00:00
UI (Keys Page) - Support cross filtering, filter by user id, filter by key hash (#10322)
* feat(filter.tsx): initial commit making filter component more generic - same style as user table filters
* refactor(all_keys_table.tsx): refactor to simplify update logic
* fix: partially revert changes - reduce scope of pr
* fix(filter_logic.tsx): fix filter update logic
* fix(all_keys_table.tsx): fix filtering + search logic
* refactor: cleanup unused params
* Revert "fix(all_keys_table.tsx): fix filtering + search logic"
This reverts commit 5fbc331970
.
* feat(filter_logic.tsx): allow filter by user id
* fix(key_management_endpoints.py): support filtering `/key/list` by key hash
Enables lookup by key hash on ui
* fix(key_list.tsx): fix update
* fix(key_management.py): fix linting error
* test: update testing
* fix(prometheus.py): fix key hash
* style(all_keys_table.tsx): style improvements
* test: fix test
This commit is contained in:
parent
339351c579
commit
c66c821f96
12 changed files with 292 additions and 350 deletions
|
@ -1000,9 +1000,9 @@ class PrometheusLogger(CustomLogger):
|
|||
):
|
||||
try:
|
||||
verbose_logger.debug("setting remaining tokens requests metric")
|
||||
standard_logging_payload: Optional[StandardLoggingPayload] = (
|
||||
request_kwargs.get("standard_logging_object")
|
||||
)
|
||||
standard_logging_payload: Optional[
|
||||
StandardLoggingPayload
|
||||
] = request_kwargs.get("standard_logging_object")
|
||||
|
||||
if standard_logging_payload is None:
|
||||
return
|
||||
|
@ -1453,6 +1453,7 @@ class PrometheusLogger(CustomLogger):
|
|||
user_id=None,
|
||||
team_id=None,
|
||||
key_alias=None,
|
||||
key_hash=None,
|
||||
exclude_team_id=UI_SESSION_TOKEN_TEAM_ID,
|
||||
return_full_object=True,
|
||||
organization_id=None,
|
||||
|
@ -1771,10 +1772,10 @@ class PrometheusLogger(CustomLogger):
|
|||
from litellm.integrations.custom_logger import CustomLogger
|
||||
from litellm.integrations.prometheus import PrometheusLogger
|
||||
|
||||
prometheus_loggers: List[CustomLogger] = (
|
||||
litellm.logging_callback_manager.get_custom_loggers_for_type(
|
||||
callback_type=PrometheusLogger
|
||||
)
|
||||
prometheus_loggers: List[
|
||||
CustomLogger
|
||||
] = litellm.logging_callback_manager.get_custom_loggers_for_type(
|
||||
callback_type=PrometheusLogger
|
||||
)
|
||||
# we need to get the initialized prometheus logger instance(s) and call logger.initialize_remaining_budget_metrics() on them
|
||||
verbose_logger.debug("found %s prometheus loggers", len(prometheus_loggers))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue