From 6b79c8166ab1a353e298f09b973564ae5d27a33a Mon Sep 17 00:00:00 2001 From: yuneng-jiang Date: Tue, 10 Nov 2026 15:12:10 -0800 Subject: [PATCH] test(integration): decode video ids with the product decoder in the callback delivery test Ports only the tests/integration/observability/test_callback_delivery.py hunk of #47600. Video ids on this line now carry a ;deployment_id: suffix after #50693, so splitting on video_id: kept the suffix. The shares_worker_state pytestmark from that hunk's context belongs to a change not on this line and is left out (cherry picked from commit e78f7b4602c15a5328f6f211c4bc9f3d664e1d50) --- tests/integration/observability/test_callback_delivery.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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)