BerriAI/litellm · error · Exception
Invalid Argilla API Key given. _credentials_api_key=None.
Error message
Invalid Argilla API Key given. _credentials_api_key=None.
What it means
Error "Invalid Argilla API Key given. _credentials_api_key=None." thrown in BerriAI/litellm.
Source
Thrown at litellm/integrations/argilla.py:90
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/"
if _credentials_base_url is None:
raise Exception("Invalid Argilla Base URL given. _credentials_base_url=None.")
_credentials_dataset_name = argilla_dataset_name or os.getenv("ARGILLA_DATASET_NAME") or "litellm-completion"
if _credentials_dataset_name is None:
raise Exception("Invalid Argilla Dataset give. Value=None.")
else:
dataset_response: Final = litellm.module_level_client.get(
url=f"{_credentials_base_url}/api/v1/me/datasets?name={_credentials_dataset_name}",
headers={"X-Argilla-Api-Key": _credentials_api_key},
)
json_response: Final = dataset_response.json()
if (
"items" in json_response
and isinstance(json_response["items"], list)
and len(json_response["items"]) > 0View on GitHub (pinned to 6c2dcb801b)
Solutions
- Set a valid Argilla API key (ARGILLA_API_KEY) or pass api_key.
When it happens
Trigger: Thrown at litellm/integrations/argilla.py:90 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/8eb4c51e32aebc77.
Report an issue: GitHub.