diff --git a/src/google/adk/artifacts/gcs_artifact_service.py b/src/google/adk/artifacts/gcs_artifact_service.py index 35aa88622..d65978f20 100644 --- a/src/google/adk/artifacts/gcs_artifact_service.py +++ b/src/google/adk/artifacts/gcs_artifact_service.py @@ -191,6 +191,6 @@ async def list_versions( blobs = self.storage_client.list_blobs(self.bucket, prefix=prefix) versions = [] for blob in blobs: - _, _, _, _, version = blob.name.split("/") + *_, version = blob.name.split("/") versions.append(int(version)) return versions diff --git a/tests/unittests/artifacts/test_artifact_service.py b/tests/unittests/artifacts/test_artifact_service.py index 0b232f4e6..fd2097668 100644 --- a/tests/unittests/artifacts/test_artifact_service.py +++ b/tests/unittests/artifacts/test_artifact_service.py @@ -253,7 +253,7 @@ async def test_list_versions(service_type): app_name = "app0" user_id = "user0" session_id = "123" - filename = "filename" + filename = "with/slash/filename" versions = [ types.Part.from_bytes( data=i.to_bytes(2, byteorder="big"), mime_type="text/plain"