{"record":{"id":"7909966927004b87","repo":"BerriAI/litellm","slug":"vantage-integration-token-must-be-provided-for-van","errorCode":null,"errorMessage":"VANTAGE_INTEGRATION_TOKEN must be provided for Vantage exports","messagePattern":"VANTAGE_INTEGRATION_TOKEN must be provided for Vantage exports","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"litellm/integrations/focus/destinations/factory.py","lineNumber":65,"sourceCode":"                \"region_name\": overrides.get(\"region_name\") or os.getenv(\"FOCUS_S3_REGION_NAME\"),\n                \"endpoint_url\": overrides.get(\"endpoint_url\") or os.getenv(\"FOCUS_S3_ENDPOINT_URL\"),\n                \"aws_access_key_id\": overrides.get(\"aws_access_key_id\") or os.getenv(\"FOCUS_S3_ACCESS_KEY\"),\n                \"aws_secret_access_key\": overrides.get(\"aws_secret_access_key\") or os.getenv(\"FOCUS_S3_SECRET_KEY\"),\n                \"aws_session_token\": overrides.get(\"aws_session_token\") or os.getenv(\"FOCUS_S3_SESSION_TOKEN\"),\n            }\n            if not resolved.get(\"bucket_name\"):\n                raise ValueError(\"FOCUS_S3_BUCKET_NAME must be provided for S3 exports\")\n            return {k: v for k, v in resolved.items() if v is not None}\n        if provider == \"vantage\":\n            resolved = {\n                \"api_key\": overrides.get(\"api_key\") or os.getenv(\"VANTAGE_API_KEY\"),\n                \"integration_token\": overrides.get(\"integration_token\") or os.getenv(\"VANTAGE_INTEGRATION_TOKEN\"),\n                \"base_url\": overrides.get(\"base_url\") or os.getenv(\"VANTAGE_BASE_URL\", \"https://api.vantage.sh\"),\n            }\n            if not resolved.get(\"api_key\"):\n                raise ValueError(\"VANTAGE_API_KEY must be provided for Vantage exports\")\n            if not resolved.get(\"integration_token\"):\n                raise ValueError(\"VANTAGE_INTEGRATION_TOKEN must be provided for Vantage exports\")\n            return {k: v for k, v in resolved.items() if v is not None}\n        if provider == \"gcs\":\n            resolved = {\n                \"bucket_name\": overrides.get(\"bucket_name\") or os.getenv(\"FOCUS_GCS_BUCKET_NAME\"),\n                \"service_account_json\": overrides.get(\"service_account_json\")\n                or os.getenv(\"FOCUS_GCS_PATH_SERVICE_ACCOUNT\"),\n            }\n            if not resolved.get(\"bucket_name\"):\n                raise ValueError(\"FOCUS_GCS_BUCKET_NAME must be provided for GCS exports\")\n            return {k: v for k, v in resolved.items() if v is not None}\n        if provider == \"mavvrik\":\n            resolved = {\n                \"api_key\": overrides.get(\"api_key\") or os.getenv(\"MAVVRIK_API_KEY\"),\n                \"api_endpoint\": overrides.get(\"api_endpoint\") or os.getenv(\"MAVVRIK_API_ENDPOINT\"),\n                \"connection_id\": overrides.get(\"connection_id\") or os.getenv(\"MAVVRIK_CONNECTION_ID\"),\n            }\n            return {k: v for k, v in resolved.items() if v is not None}\n        raise NotImplementedError(f\"Provider '{provider}' not supported for Focus export configuration\")","sourceCodeStart":47,"sourceCodeEnd":83,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/integrations/focus/destinations/factory.py#L47-L83","documentation":"For Vantage Focus destinations, _resolve_config checks the integration token after the API key: it resolves integration_token from config overrides then the VANTAGE_INTEGRATION_TOKEN environment variable and raises ValueError when neither is present. The token identifies the Vantage integration that receives the exported FOCUS data, so it cannot be defaulted.","triggerScenarios":"FocusDestinationFactory.create(provider='vantage', ...) with VANTAGE_API_KEY set but VANTAGE_INTEGRATION_TOKEN missing; the token created in the Vantage dashboard but never added to the deployment env; config carries api_key only.","commonSituations":"Following setup docs that highlight the API key and mention the integration token in passing; per-environment tokens not synced; dashboards re-issuing tokens invalidating deployed values (that yields auth failures instead — this error is simply absence).","solutions":["Set VANTAGE_INTEGRATION_TOKEN in the environment (alongside VANTAGE_API_KEY)","Or pass integration_token in the config dict to create()","Store both values together in the same secret so they cannot drift","Add a startup check for both Vantage vars when vantage export is enabled"],"exampleFix":"# before\nos.environ['VANTAGE_API_KEY'] = 'vk-...'\ndest = FocusDestinationFactory.create(provider='vantage', prefix='focus/')\n\n# after\nos.environ['VANTAGE_API_KEY'] = 'vk-...'\nos.environ['VANTAGE_INTEGRATION_TOKEN'] = 'it-...'\ndest = FocusDestinationFactory.create(provider='vantage', prefix='focus/')","handlingStrategy":"validation","validationCode":"import os\n\nmissing = [v for v in ('VANTAGE_API_KEY', 'VANTAGE_INTEGRATION_TOKEN') if not os.getenv(v)]\nif missing:\n    raise ValueError(f'Vantage export missing env vars: {missing}')\ndest = FocusDestinationFactory.create(provider='vantage', prefix='focus/')","typeGuard":null,"tryCatchPattern":"try:\n    dest = FocusDestinationFactory.create(provider='vantage', prefix='focus/', config=config)\nexcept ValueError as e:\n    if 'VANTAGE_INTEGRATION_TOKEN' in str(e):\n        raise RuntimeError('Vantage export not configured; set VANTAGE_INTEGRATION_TOKEN') from e\n    raise","preventionTips":["Create the integration in the Vantage dashboard first, then deploy its token as an env var","Validate both Vantage vars together so you surface all gaps in one pass","Include the token in infrastructure manifests reviewed alongside the API key"],"tags":["litellm","focus","vantage","export","missing-env-var","auth-token"],"backgroundTag":"missing-env-var","analyzedSha":"77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8","analyzedAt":"2026-08-18T11:44:31.656Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}