BerriAI/litellm · error · ValueError
MAVVRIK_API_ENDPOINT must be provided for Mavvrik FOCUS dest
Error message
MAVVRIK_API_ENDPOINT must be provided for Mavvrik FOCUS destination (set MAVVRIK_API_ENDPOINT env var or pass in destination_config)
What it means
Second mandatory-field check in FocusMavvrikDestination.__init__: api_endpoint must be present in the config. It is validated after api_key, so a fully-missing config surfaces error 411 first. After presence, the endpoint is further validated for https scheme and Mavvrik domain (errors 407/408).
Source
Thrown at litellm/integrations/focus/destinations/mavvrik_destination.py:72
def __init__(
self,
*,
prefix: str,
config: dict[str, Any] | None = None,
) -> None:
config = config or {}
api_key: Final = config.get("api_key")
api_endpoint: Final = config.get("api_endpoint")
connection_id: Final = config.get("connection_id")
if not api_key:
raise ValueError(
"MAVVRIK_API_KEY must be provided for Mavvrik FOCUS destination "
"(set MAVVRIK_API_KEY env var or pass in destination_config)"
)
if not api_endpoint:
raise ValueError(
"MAVVRIK_API_ENDPOINT must be provided for Mavvrik FOCUS destination "
"(set MAVVRIK_API_ENDPOINT env var or pass in destination_config)"
)
if not connection_id:
raise ValueError(
"MAVVRIK_CONNECTION_ID must be provided for Mavvrik FOCUS destination "
"(set MAVVRIK_CONNECTION_ID env var or pass in destination_config)"
)
_validate_api_endpoint(api_endpoint)
self.api_key = api_key
self.api_endpoint = api_endpoint.rstrip("/")
self.connection_id = connection_id
self.prefix = prefix
self._http: AsyncHTTPHandler = get_async_httpx_client(llm_provider=httpxSpecialProvider.LoggingCallback)
self._registered = False
View on GitHub (pinned to 6c2dcb801b)
Solutions
- Set MAVVRIK_API_ENDPOINT=https://api.mavvrik.dev/<tenant_id>.
- Or pass api_endpoint in the destination config overrides.
- Set all three mavvrik vars together (API key, endpoint, connection id) to avoid sequential validation failures.
Example fix
# before
config = {"api_key": key, "connection_id": cid}
# after
config = {"api_key": key, "api_endpoint": "https://api.mavvrik.dev/acme", "connection_id": cid} Defensive patterns
Strategy: validation
Validate before calling
import os
endpoint = os.getenv("MAVVRIK_API_ENDPOINT") or config.get("api_endpoint")
if not endpoint:
raise SystemExit("MAVVRIK_API_ENDPOINT missing: use https://api.mavvrik.dev/<tenant_id>") Try / catch
try:
dest = FocusMavvrikDestination(prefix=p, config=cfg)
except ValueError as e:
if "MAVVRIK_API_ENDPOINT" in str(e):
log_config_error("mavvrik", missing=["api_endpoint"])
raise Prevention
- Validate the endpoint in one place (env loader) with scheme + domain checks so downstream errors are impossible.
- Document the expected format (https://api.mavvrik.dev/<tenant_id>) next to the env var in your deployment manifests.
When it happens
Trigger: Constructing the mavvrik destination with api_key resolved but no api_endpoint in config and no MAVVRIK_API_ENDPOINT env var (when using the factory).
Common situations: Only the API key was configured; endpoint value left as None by config templating; moving environments (dev endpoint removed but not replaced); whitespace-only string fails the falsy check.
Related errors
- MAVVRIK_API_KEY must be provided for Mavvrik FOCUS destinati
- MAVVRIK_CONNECTION_ID must be provided for Mavvrik FOCUS des
- FOCUS_S3_BUCKET_NAME must be provided for S3 exports
- VANTAGE_API_KEY must be provided for Vantage exports
- VANTAGE_INTEGRATION_TOKEN must be provided for Vantage expor
AI-assisted analysis of BerriAI/litellm@6c2dcb801b (2026-08-15).
Data as JSON: /api/errors/63e7d99752c21390.
Report an issue: GitHub.