{"record":{"id":"7dc5e8140940f010","repo":"BerriAI/litellm","slug":"integration-token-must-be-provided-for-vantage-des","errorCode":null,"errorMessage":"integration_token must be provided for Vantage destination (set VANTAGE_INTEGRATION_TOKEN env var or pass in destination_config)","messagePattern":"integration_token must be provided for Vantage destination \\(set VANTAGE_INTEGRATION_TOKEN env var or pass in destination_config\\)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"litellm/integrations/focus/destinations/vantage_destination.py","lineNumber":108,"sourceCode":"class FocusVantageDestination(FocusDestination):\n    \"\"\"Upload FOCUS CSV exports to the Vantage cost-import API.\"\"\"\n\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        integration_token: Final = config.get(\"integration_token\")\n        if not api_key:\n            raise ValueError(\n                \"api_key must be provided for Vantage destination \"\n                \"(set VANTAGE_API_KEY env var or pass in destination_config)\"\n            )\n        if not integration_token:\n            raise ValueError(\n                \"integration_token must be provided for Vantage destination \"\n                \"(set VANTAGE_INTEGRATION_TOKEN env var or pass in destination_config)\"\n            )\n        self.api_key = api_key\n        self.integration_token = integration_token\n        self.base_url = config.get(\"base_url\", \"https://api.vantage.sh\")\n        self.prefix = prefix\n\n    async def deliver(\n        self,\n        *,\n        content: bytes,\n        time_window: FocusTimeWindow,\n        filename: str,\n    ) -> None:\n        \"\"\"Upload CSV content to the Vantage API, batching if needed.\"\"\"\n        if not content:\n            verbose_logger.debug(\"Vantage destination: empty content, skipping upload\")","sourceCodeStart":90,"sourceCodeEnd":126,"githubUrl":"https://github.com/BerriAI/litellm/blob/6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d/litellm/integrations/focus/destinations/vantage_destination.py#L90-L126","documentation":"FocusVantageDestination.__init__ raises ValueError when api_key is present but integration_token is missing. Vantage's cost-import API authenticates with a pair: an account-level API key plus a per-integration token; both are mandatory, and this check runs after the api_key check.","triggerScenarios":"Constructing the Vantage destination with config={'api_key': ...} but no 'integration_token' and no VANTAGE_INTEGRATION_TOKEN env var.","commonSituations":"Only the API key was configured; the integration token was created in Vantage but never copied into env/config; token removed during key rotation.","solutions":["Create the integration token in the Vantage UI (Entities → Integrations) and set export VANTAGE_INTEGRATION_TOKEN=....","Or pass it in config together with the API key.","Re-run the export once both credentials are present."],"exampleFix":"# before\nconfig = {\"api_key\": \"vt_...\"}\n\n# after\nconfig = {\"api_key\": \"vt_...\", \"integration_token\": \"vti_...\"}","handlingStrategy":"validation","validationCode":"missing = [k for k, env in ((\"api_key\", \"VANTAGE_API_KEY\"), (\"integration_token\", \"VANTAGE_INTEGRATION_TOKEN\")) if not (dest_config.get(k) or os.getenv(env))]\nif missing:\n    raise ValueError(f\"Missing Vantage credentials: {missing}\")","typeGuard":"def has_vantage_creds(cfg: dict) -> bool:\n    import os\n    return bool(cfg.get(\"api_key\") or os.getenv(\"VANTAGE_API_KEY\")) and bool(cfg.get(\"integration_token\") or os.getenv(\"VANTAGE_INTEGRATION_TOKEN\"))","tryCatchPattern":null,"preventionTips":["Create both the API key and integration token in Vantage before enabling the destination.","Preflight both env vars in the same process that runs the export.","Rotate the pair together and update both env vars atomically."],"tags":["config","vantage","env-vars","focus-export","auth"],"backgroundTag":null,"analyzedSha":"6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d","analyzedAt":"2026-08-15T07:12:03.035Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}