{"record":{"id":"ac06ee9de517b07e","repo":"BerriAI/litellm","slug":"focus-gcs-bucket-name-must-be-provided-for-gcs-exp","errorCode":null,"errorMessage":"FOCUS_GCS_BUCKET_NAME must be provided for GCS exports","messagePattern":"FOCUS_GCS_BUCKET_NAME must be provided for GCS exports","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"litellm/integrations/focus/destinations/factory.py","lineNumber":74,"sourceCode":"        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\")\n","sourceCodeStart":56,"sourceCodeEnd":84,"githubUrl":"https://github.com/BerriAI/litellm/blob/6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d/litellm/integrations/focus/destinations/factory.py#L56-L84","documentation":"For provider=\"gcs\", the factory resolves bucket_name from overrides or FOCUS_GCS_BUCKET_NAME and requires it. service_account_json (or FOCUS_GCS_PATH_SERVICE_ACCOUNT) is optional — the GCS destination falls back to default application credentials — but the bucket name is mandatory.","triggerScenarios":"Building a Focus export with provider=\"gcs\" with no bucket_name in the config dict and no FOCUS_GCS_BUCKET_NAME env var.","commonSituations":"Confusing this with the S3 bucket var (FOCUS_S3_BUCKET_NAME) and setting the wrong one; Workload Identity setups where devs assume the bucket is inferred from the SA bindings; missing env in Helm values; bucket name present but as None due to optional config templating.","solutions":["Set FOCUS_GCS_BUCKET_NAME=my-gcs-bucket in the environment.","Or pass bucket_name in the destination config overrides for provider 'gcs'.","Double-check you set the GCS variable, not FOCUS_S3_BUCKET_NAME, when exporting to Google Cloud Storage.","Optionally also set FOCUS_GCS_PATH_SERVICE_ACCOUNT if the workload has no default credentials."],"exampleFix":"# before\nconfig = focus_destination_config(provider=\"gcs\", overrides={})\n\n# after\nconfig = focus_destination_config(provider=\"gcs\", overrides={\"bucket_name\": \"my-focus-export-bucket\"})","handlingStrategy":"validation","validationCode":"import os\n\nif not (overrides.get(\"bucket_name\") or os.getenv(\"FOCUS_GCS_BUCKET_NAME\")):\n    raise SystemExit(\"FOCUS_GCS_BUCKET_NAME missing: set it before enabling the GCS Focus export\")","typeGuard":null,"tryCatchPattern":"try:\n    cfg = focus_destination_config(provider=\"gcs\", overrides=overrides)\nexcept ValueError as e:\n    if \"FOCUS_GCS_BUCKET_NAME\" in str(e):\n        log_config_error(\"gcs\", missing=[\"bucket_name\"])\n    raise","preventionTips":["Namespace env vars clearly per provider (FOCUS_S3_* vs FOCUS_GCS_*) in your deployment manifest comments.","Assert non-empty (not merely present) values — the factory rejects empty strings."],"tags":["focus","gcs","configuration","env-var","validation"],"backgroundTag":null,"analyzedSha":"6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d","analyzedAt":"2026-08-15T07:12:03.035Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}