{"record":{"id":"63e7d99752c21390","repo":"BerriAI/litellm","slug":"mavvrik-api-endpoint-must-be-provided-for-mavvrik","errorCode":null,"errorMessage":"MAVVRIK_API_ENDPOINT must be provided for Mavvrik FOCUS destination (set MAVVRIK_API_ENDPOINT env var or pass in destination_config)","messagePattern":"MAVVRIK_API_ENDPOINT must be provided for Mavvrik FOCUS destination \\(set MAVVRIK_API_ENDPOINT env var or pass in destination_config\\)","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"litellm/integrations/focus/destinations/mavvrik_destination.py","lineNumber":72,"sourceCode":"\n    def __init__(\n        self,\n        *,\n        prefix: str,\n        config: dict[str, Any] | None = None,\n    ) -> None:\n        config = config or {}\n        api_key: Final = config.get(\"api_key\")\n        api_endpoint: Final = config.get(\"api_endpoint\")\n        connection_id: Final = config.get(\"connection_id\")\n\n        if not api_key:\n            raise ValueError(\n                \"MAVVRIK_API_KEY must be provided for Mavvrik FOCUS destination \"\n                \"(set MAVVRIK_API_KEY env var or pass in destination_config)\"\n            )\n        if not api_endpoint:\n            raise ValueError(\n                \"MAVVRIK_API_ENDPOINT must be provided for Mavvrik FOCUS destination \"\n                \"(set MAVVRIK_API_ENDPOINT env var or pass in destination_config)\"\n            )\n        if not connection_id:\n            raise ValueError(\n                \"MAVVRIK_CONNECTION_ID must be provided for Mavvrik FOCUS destination \"\n                \"(set MAVVRIK_CONNECTION_ID env var or pass in destination_config)\"\n            )\n\n        _validate_api_endpoint(api_endpoint)\n\n        self.api_key = api_key\n        self.api_endpoint = api_endpoint.rstrip(\"/\")\n        self.connection_id = connection_id\n        self.prefix = prefix\n        self._http: AsyncHTTPHandler = get_async_httpx_client(llm_provider=httpxSpecialProvider.LoggingCallback)\n        self._registered = False\n","sourceCodeStart":54,"sourceCodeEnd":90,"githubUrl":"https://github.com/BerriAI/litellm/blob/6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d/litellm/integrations/focus/destinations/mavvrik_destination.py#L54-L90","documentation":"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).","triggerScenarios":"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).","commonSituations":"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.","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."],"exampleFix":"# before\nconfig = {\"api_key\": key, \"connection_id\": cid}\n\n# after\nconfig = {\"api_key\": key, \"api_endpoint\": \"https://api.mavvrik.dev/acme\", \"connection_id\": cid}","handlingStrategy":"validation","validationCode":"import os\n\nendpoint = os.getenv(\"MAVVRIK_API_ENDPOINT\") or config.get(\"api_endpoint\")\nif not endpoint:\n    raise SystemExit(\"MAVVRIK_API_ENDPOINT missing: use https://api.mavvrik.dev/<tenant_id>\")","typeGuard":null,"tryCatchPattern":"try:\n    dest = FocusMavvrikDestination(prefix=p, config=cfg)\nexcept ValueError as e:\n    if \"MAVVRIK_API_ENDPOINT\" in str(e):\n        log_config_error(\"mavvrik\", missing=[\"api_endpoint\"])\n    raise","preventionTips":["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."],"tags":["focus","mavvrik","configuration","env-var","validation"],"backgroundTag":null,"analyzedSha":"6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d","analyzedAt":"2026-08-15T07:12:03.035Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}