mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-07 08:26:10 +00:00
feat(pointfive): list pointfive in the proxy callback registry
This commit is contained in:
parent
7eee31e6ae
commit
f43a7bbe11
2 changed files with 24 additions and 0 deletions
|
|
@ -3548,6 +3548,15 @@ class AllCallbacks(LiteLLMPydanticObjectBase):
|
|||
],
|
||||
)
|
||||
|
||||
pointfive: CallbackOnUI = CallbackOnUI(
|
||||
litellm_callback_name="pointfive",
|
||||
ui_callback_name="PointFive",
|
||||
litellm_callback_params=[ # mutable-ok: the registry field is typed list
|
||||
"POINTFIVE_API_KEY",
|
||||
"POINTFIVE_API_URL",
|
||||
],
|
||||
)
|
||||
|
||||
|
||||
class SpendLogsMetadata(TypedDict):
|
||||
"""
|
||||
|
|
|
|||
15
tests/test_litellm/proxy/test_pointfive_ui_callback.py
Normal file
15
tests/test_litellm/proxy/test_pointfive_ui_callback.py
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
from litellm.integrations.custom_logger import CustomLogger
|
||||
from litellm.proxy._types import AllCallbacks
|
||||
|
||||
|
||||
def test_pointfive_is_offered_in_the_ui_callback_registry():
|
||||
"""The proxy ui builds its form from this registry, so an absent entry is an absent form."""
|
||||
entry = AllCallbacks().pointfive
|
||||
|
||||
assert entry.litellm_callback_name == "pointfive"
|
||||
assert entry.ui_callback_name == "PointFive"
|
||||
|
||||
|
||||
def test_the_ui_offers_the_two_settings_the_plugin_reads():
|
||||
"""get_callback_env_vars is what the ui renders; it must match what the logger looks up."""
|
||||
assert tuple(CustomLogger.get_callback_env_vars("pointfive")) == ("POINTFIVE_API_KEY", "POINTFIVE_API_URL")
|
||||
Loading…
Add table
Reference in a new issue