BerriAI/litellm · error · Exception
'litellm.argilla_transformation_object' is required, to log
Error message
'litellm.argilla_transformation_object' is required, to log your payload to Argilla.
What it means
Error "'litellm.argilla_transformation_object' is required, to log your payload to Argilla." thrown in BerriAI/litellm.
Source
Thrown at litellm/integrations/argilla.py:50
non_serializable_types: Final = (
types.CoroutineType,
types.FunctionType,
types.GeneratorType,
BaseModel,
)
return not isinstance(value, non_serializable_types)
class ArgillaLogger(CustomBatchLogger):
def __init__(
self,
argilla_api_key: str | None = None,
argilla_dataset_name: str | None = None,
argilla_base_url: str | None = None,
**kwargs,
):
if litellm.argilla_transformation_object is None:
raise Exception("'litellm.argilla_transformation_object' is required, to log your payload to Argilla.")
self.validate_argilla_transformation_object(litellm.argilla_transformation_object)
self.argilla_transformation_object = litellm.argilla_transformation_object
self.default_credentials = self.get_credentials_from_env(
argilla_api_key=argilla_api_key,
argilla_dataset_name=argilla_dataset_name,
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())View on GitHub (pinned to 6c2dcb801b)
Solutions
- Set litellm.argilla_transformation_object to a dict mapping Argilla fields before logging.
When it happens
Trigger: Thrown at litellm/integrations/argilla.py:50 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/8ec6561db4194570.
Report an issue: GitHub.