BerriAI/litellm · error · NotImplementedError
VertexAIFilesConfig does not support file listing
Error message
VertexAIFilesConfig does not support file listing
What it means
Sentinel from transform_list_files_request: Vertex AI files are stored in caller-configured GCS buckets rather than a LiteLLM-managed index, so there is no provider-side list operation to implement and the unsupported call is rejected.
Source
Thrown at litellm/llms/vertex_ai/files/transformation.py:952
) -> FileDeleted:
file_id = "deleted"
if hasattr(raw_response, "request") and raw_response.request:
url: Final = str(raw_response.request.url)
if "/b/" in url and "/o/" in url:
import urllib.parse
bucket_part: Final = url.split("/b/")[-1].split("/o/")[0]
encoded_name: Final = url.split("/o/")[-1].split("?")[0]
file_id = f"gs://{bucket_part}/{urllib.parse.unquote(encoded_name)}"
return FileDeleted(id=file_id, deleted=True, object="file")
def transform_list_files_request(
self,
purpose: str | None,
optional_params: dict,
litellm_params: dict,
) -> tuple[str, dict]:
raise NotImplementedError("VertexAIFilesConfig does not support file listing")
def transform_list_files_response(
self,
raw_response: Response,
logging_obj: LiteLLMLoggingObj,
litellm_params: dict,
) -> list[OpenAIFileObject]:
raise NotImplementedError("VertexAIFilesConfig does not support file listing")
def transform_file_content_request(
self,
file_content_request,
optional_params: dict,
litellm_params: dict,
) -> tuple[str, dict]:
file_id: Final = file_content_request.get("file_id", "")
bucket, encoded_object = self._parse_gcs_uri(file_id, litellm_params)
url: Final = f"https://storage.googleapis.com/storage/v1/b/{bucket}/o/{encoded_object}?alt=media"View on GitHub (pinned to 77b7c6c40c)
Solutions
- Do not call file listing for vertex_ai; query GCS directly to list objects.
Example fix
# use the GCS client to list bucket contents instead.
Defensive patterns
Strategy: fallback
When it happens
Trigger: Triggered when attempting to list files via VertexAIFilesConfig, which does not support file listing.
Common situations: See trigger scenarios.
AI-assisted analysis of BerriAI/litellm@77b7c6c40c (2026-08-18).
Data as JSON: /api/errors/8151cf6bcd37eacb.
Report an issue: GitHub.