diff --git a/tests/integration/observability/test_callback_delivery.py b/tests/integration/observability/test_callback_delivery.py index 543e60da4a6..d49c2c3fb0f 100644 --- a/tests/integration/observability/test_callback_delivery.py +++ b/tests/integration/observability/test_callback_delivery.py @@ -1,4 +1,3 @@ -import base64 import json import uuid from collections.abc import Callable, Mapping @@ -14,6 +13,8 @@ from integration._support.database import read_rows from integration._support.process import owned_proxy from integration._support.wire import Reply, Request, wire_server +from litellm.types.videos.utils import decode_video_id_with_provider + @pytest.mark.covers( "other.observability.callbacks.credentials_stay_out_of_event_bodies", @@ -346,9 +347,8 @@ def _responses_text(body: dict[str, JsonValue]) -> str: def _video_job(body: dict[str, JsonValue]) -> tuple[str, str]: - encoded_id: Final = string_value(body["id"]).removeprefix("video_") - decoded: Final = base64.b64decode(encoded_id).decode() - return decoded.rsplit("video_id:", 1)[-1], string_value(body["status"]) + decoded: Final = decode_video_id_with_provider(string_value(body["id"])) + return string_value(decoded.get("video_id")), string_value(body["status"]) @dataclass(frozen=True, slots=True)