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 e78f7b4602)
This commit is contained in:
yuneng-jiang 2026-11-10 15:12:10 -08:00 • committed by Yuneng Jiang
parent 26eccbf00e
commit 6b79c8166a
No known key found for this signature in database

View file

@ -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)