BerriAI/litellm · error · NotImplementedError

GoogleAIStudioFilesHandler does not support file listing

Error message

GoogleAIStudioFilesHandler does not support file listing

What it means

Error "GoogleAIStudioFilesHandler does not support file listing" thrown in BerriAI/litellm.

Source

Thrown at litellm/llms/gemini/files/transformation.py:372

                        file_id = url.split("/files/")[-1].split("?")[0]
                        # Add the files/ prefix if not present
                        if not file_id.startswith("files/"):
                            file_id = f"files/{file_id}"

                return FileDeleted(id=file_id, deleted=True, object="file")
            else:
                raise ValueError(f"Failed to delete file: {raw_response.text}")
        except Exception as e:
            verbose_logger.exception("Error parsing file delete response: %s", e)
            raise ValueError(f"Error parsing file delete response: {e}")

    def transform_list_files_request(
        self,
        purpose: str | None,
        optional_params: dict,
        litellm_params: dict,
    ) -> tuple[str, dict]:
        raise NotImplementedError("GoogleAIStudioFilesHandler does not support file listing")

    def transform_list_files_response(
        self,
        raw_response: httpx.Response,
        logging_obj: LiteLLMLoggingObj,
        litellm_params: dict,
    ) -> list[OpenAIFileObject]:
        raise NotImplementedError("GoogleAIStudioFilesHandler does not support file listing")

    def transform_file_content_request(
        self,
        file_content_request,
        optional_params: dict,
        litellm_params: dict,
    ) -> tuple[str, dict]:
        raise NotImplementedError("GoogleAIStudioFilesHandler does not support file content retrieval")

    def transform_file_content_response(

View on GitHub (pinned to 6c2dcb801b)

Solutions

  1. Google AI Studio files do not support listing via this handler.

When it happens

Trigger: Thrown at litellm/llms/gemini/files/transformation.py:372 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of BerriAI/litellm@6c2dcb801b (2026-08-15). Data as JSON: /api/errors/de6a814c2bbbd14b. Report an issue: GitHub.