{"record":{"id":"34cb3709899b0d84","repo":"BerriAI/litellm","slug":"mavvrik-connection-id-must-be-provided-for-mavvrik","errorCode":null,"errorMessage":"MAVVRIK_CONNECTION_ID must be provided for Mavvrik FOCUS destination (set MAVVRIK_CONNECTION_ID env var or pass in destination_config)","messagePattern":"MAVVRIK_CONNECTION_ID must be provided for Mavvrik FOCUS destination \\(set MAVVRIK_CONNECTION_ID env var or pass in destination_config\\)","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"litellm/integrations/focus/destinations/mavvrik_destination.py","lineNumber":77,"sourceCode":"        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\n    @property\n    def _agent_url(self) -> str:\n        return f\"{self.api_endpoint}/metrics/agent/ai/{self.connection_id}\"\n\n    @property","sourceCodeStart":59,"sourceCodeEnd":95,"githubUrl":"https://github.com/BerriAI/litellm/blob/6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d/litellm/integrations/focus/destinations/mavvrik_destination.py#L59-L95","documentation":"Third mandatory-field check in FocusMavvrikDestination.__init__: connection_id (the Mavvrik connector name sent in the register POST body as {\"name\": connection_id}) must be present. It is checked last, after api_key and api_endpoint.","triggerScenarios":"Constructing the mavvrik destination with api_key and api_endpoint resolved but connection_id missing from config and MAVVRIK_CONNECTION_ID unset.","commonSituations":"The connection was created in the Mavvrik dashboard but its ID never copied into deployment env; ID stored under a different variable name; regenerated connection after re-enabling a connector, old ID removed.","solutions":["Copy the connection name/ID from the Mavvrik dashboard and set MAVVRIK_CONNECTION_ID.","Or pass connection_id in the destination config overrides.","Confirm the ID matches an enabled connector — a stale ID leads to the 410 'disconnected' error later."],"exampleFix":"# before\nconfig = {\"api_key\": key, \"api_endpoint\": ep}\n\n# after\nconfig = {\"api_key\": key, \"api_endpoint\": ep, \"connection_id\": os.environ[\"MAVVRIK_CONNECTION_ID\"]}","handlingStrategy":"validation","validationCode":"import os\n\nif not (os.getenv(\"MAVVRIK_CONNECTION_ID\") or config.get(\"connection_id\")):\n    raise SystemExit(\"MAVVRIK_CONNECTION_ID missing: copy the connector name from the Mavvrik dashboard\")","typeGuard":null,"tryCatchPattern":"try:\n    dest = FocusMavvrikDestination(prefix=p, config=cfg)\nexcept ValueError as e:\n    if \"MAVVRIK_CONNECTION_ID\" in str(e):\n        log_config_error(\"mavvrik\", missing=[\"connection_id\"])\n    raise","preventionTips":["After creating/re-enabling a Mavvrik connector, immediately update the env var and redeploy.","Track connector lifecycle (created/enabled/disabled) in your ops notes so IDs never go stale silently."],"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"}