BerriAI/litellm · error · Exception

'argilla_transformation_object' must be a dictionary, to log

Error message

'argilla_transformation_object' must be a dictionary, to log your payload to Argilla.

What it means

Error "'argilla_transformation_object' must be a dictionary, to log your payload to Argilla." thrown in BerriAI/litellm.

Source

Thrown at litellm/integrations/argilla.py:74

            argilla_base_url=argilla_base_url,
        )
        self.sampling_rate: float = (
            float(os.getenv("ARGILLA_SAMPLING_RATE"))
            if os.getenv("ARGILLA_SAMPLING_RATE") is not None and os.getenv("ARGILLA_SAMPLING_RATE").strip().isdigit()
            else 1.0
        )

        self.async_httpx_client = get_async_httpx_client(llm_provider=httpxSpecialProvider.LoggingCallback)
        _batch_size: Final = os.getenv("ARGILLA_BATCH_SIZE", None) or litellm.argilla_batch_size
        if _batch_size:
            self.batch_size = int(_batch_size)
        asyncio.create_task(self.periodic_flush())
        self.flush_lock = asyncio.Lock()
        super().__init__(**kwargs, flush_lock=self.flush_lock)

    def validate_argilla_transformation_object(self, argilla_transformation_object: dict[str, Any]):
        if not isinstance(argilla_transformation_object, dict):
            raise Exception("'argilla_transformation_object' must be a dictionary, to log your payload to Argilla.")

        for v in argilla_transformation_object.values():
            if v not in SUPPORTED_PAYLOAD_FIELDS:
                raise Exception(
                    f"All values in argilla_transformation_object must be a key in SUPPORTED_PAYLOAD_FIELDS, {v} is not a valid key."
                )

    def get_credentials_from_env(
        self,
        argilla_api_key: str | None,
        argilla_dataset_name: str | None,
        argilla_base_url: str | None,
    ) -> ArgillaCredentialsObject:
        _credentials_api_key: Final = argilla_api_key or os.getenv("ARGILLA_API_KEY")
        if _credentials_api_key is None:
            raise Exception("Invalid Argilla API Key given. _credentials_api_key=None.")

        _credentials_base_url: Final = argilla_base_url or os.getenv("ARGILLA_BASE_URL") or "http://localhost:6900/"

View on GitHub (pinned to 6c2dcb801b)

Solutions

  1. Pass argilla_transformation_object as a dictionary.

When it happens

Trigger: Thrown at litellm/integrations/argilla.py:74 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/f7ca65b30a5796d4. Report an issue: GitHub.