{"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":"validation","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/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/integrations/focus/destinations/mavvrik_destination.py#L54-L90","documentation":"ValueError raised in FocusMavvrikDestination.__init__ when the resolved config has no truthy 'api_endpoint'. The endpoint (e.g. https://api.mavvrik.dev/<tenant_id>) is the base for the agent registration, upload-url, and metricsMarker calls. Resolved from destination_config['api_endpoint'] or MAVVRIK_API_ENDPOINT; checked after the api_key check, still at construction time.","triggerScenarios":"Enabling the Mavvrik FOCUS destination with MAVVRIK_API_ENDPOINT unset and no api_endpoint in the config dict (None or empty string), while MAVVRIK_API_KEY is present.","commonSituations":"Only the API key was added to the deployment env, the tenant-scoped endpoint from Mavvrik onboarding was never copied, or the var was set in a different shell/environment than the one running the export.","solutions":["Set the tenant-scoped endpoint: export MAVVRIK_API_ENDPOINT=https://api.mavvrik.dev/<tenant_id>","Or pass it in config: config={'api_endpoint': 'https://api.mavvrik.dev/<tenant_id>', ...}","Copy the exact value from the Mavvrik connector setup page (it includes the tenant path)"],"exampleFix":"# before\nexport MAVVRIK_API_KEY=mk_live_xxx\n# MAVVRIK_API_ENDPOINT missing\n\n# after\nexport MAVVRIK_API_KEY=mk_live_xxx\nexport MAVVRIK_API_ENDPOINT=https://api.mavvrik.dev/acme","handlingStrategy":"validation","validationCode":"import os\n\napi_endpoint = (config or {}).get(\"api_endpoint\") or os.getenv(\"MAVVRIK_API_ENDPOINT\")\nif not api_endpoint:\n    raise SystemExit(\"MAVVRIK_API_ENDPOINT is required (env var or destination_config['api_endpoint'])\")","typeGuard":"import os\nfrom typing import Any\n\ndef has_mavvrik_endpoint(config: dict[str, Any] | None) -> bool:\n    \"\"\"True when a Mavvrik API endpoint is resolvable.\"\"\"\n    return bool((config or {}).get(\"api_endpoint\") or os.getenv(\"MAVVRIK_API_ENDPOINT\"))","tryCatchPattern":"try:\n    destination = FocusMavvrikDestination(prefix=\"focus\", config=cfg)\nexcept ValueError as e:\n    raise SystemExit(f\"Mavvrik destination misconfigured: {e}\") from e","preventionTips":["Store the tenant-scoped endpoint from the Mavvrik UI next to the API key in the same secret","Include all three Mavvrik vars in deployment checklists and CI config validation"],"tags":["mavvrik","env-var","config","endpoint","validation"],"backgroundTag":"missing-env-var","analyzedSha":"77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8","analyzedAt":"2026-08-18T11:44:31.656Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}