test(e2e): assert on configured callback rows and use a callback absent from CI configs

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
Devin AI 2026-09-23 13:56:29 +00:00
parent f19f6a4841
commit ed782429e5
2 changed files with 4 additions and 13 deletions

View file

@ -522,7 +522,7 @@ class LoggingClient:
)
def config_callback_names(self) -> set[str]:
"""Every name GET /get/config/callbacks lists as an active callback."""
"""Names GET /get/config/callbacks lists as configured (runtime-only read_only rows excluded)."""
return {
entry.name
for entry in unwrap(
@ -533,6 +533,7 @@ class LoggingClient:
response_type=ConfigCallbacksResponse,
)
).callbacks
if not entry.read_only
}
def delete_config_callback(self, callback_name: str) -> Result[CallbackDeleteResponse]:

View file

@ -1,14 +1,4 @@
"""Live e2e: a callback the Admin UI lists must also be deletable.
GET /get/config/callbacks enumerates litellm_settings.success_callback,
failure_callback and callbacks, plus runtime-only loggers, but
POST /config/callback/delete only looks inside success_callback. A callback
configured under `callbacks` or `failure_callback` is listed as active on the
Logging & Alerts -> Logging Callbacks page yet its delete answers 404 "Callback
not found in active configuration". The success_callback case is the control:
it proves the add/list/delete round trip works when the configured key is the
one the delete route actually reads.
"""
"""A callback listed by GET /get/config/callbacks must be deletable with POST /config/callback/delete."""
from collections.abc import Callable
@ -20,7 +10,7 @@ from models import LitellmCallbackSettings
pytestmark = pytest.mark.e2e
CALLBACK_NAME = "datadog"
CALLBACK_NAME = "langsmith"
def _assert_listed_then_deleted(