{"record":{"id":"aec834860b1b63cb","repo":"BerriAI/litellm","slug":"provider-provider-not-supported-for-focus-expo","errorCode":null,"errorMessage":"Provider '{provider}' not supported for Focus export","messagePattern":"Provider '(.+?)' not supported for Focus export","errorType":"exception","errorClass":"NotImplementedError","httpStatus":null,"severity":"error","filePath":"litellm/integrations/focus/destinations/factory.py","lineNumber":36,"sourceCode":"    @staticmethod\n    def create(\n        *,\n        provider: str,\n        prefix: str,\n        config: dict[str, Any] | None = None,\n    ) -> FocusDestination:\n        \"\"\"Return a destination implementation for the requested provider.\"\"\"\n        provider_lower: Final = provider.lower()\n        normalized_config = FocusDestinationFactory._resolve_config(provider=provider_lower, overrides=config or {})\n        if provider_lower == \"s3\":\n            return FocusS3Destination(prefix=prefix, config=normalized_config)\n        if provider_lower == \"vantage\":\n            return FocusVantageDestination(prefix=prefix, config=normalized_config)\n        if provider_lower == \"gcs\":\n            return FocusGCSDestination(prefix=prefix, config=normalized_config)\n        if provider_lower == \"mavvrik\":\n            return FocusMavvrikDestination(prefix=prefix, config=normalized_config)\n        raise NotImplementedError(f\"Provider '{provider}' not supported for Focus export\")\n\n    @staticmethod\n    def _resolve_config(\n        *,\n        provider: str,\n        overrides: dict[str, Any],\n    ) -> dict[str, Any]:\n        if provider == \"s3\":\n            resolved = {\n                \"bucket_name\": overrides.get(\"bucket_name\") or os.getenv(\"FOCUS_S3_BUCKET_NAME\"),\n                \"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\")","sourceCodeStart":18,"sourceCodeEnd":54,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/integrations/focus/destinations/factory.py#L18-L54","documentation":"FocusDestinationFactory.create lowercases the provider string and dispatches to exactly four implementations — s3, vantage, gcs, mavvrik. Any other value falls through every if-branch and raises NotImplementedError with the provider echoed back. Case is normalized, but surrounding whitespace and typos are not.","triggerScenarios":"FocusDestinationFactory.create(provider='azure', ...) or provider='wasabi'; a trailing space ('s3 ') that lower() does not strip; a value read from config/env with a typo like 'gc'; a provider name from a newer/older version mismatch.","commonSituations":"Config files copied from other tooling with different provider names; user-facing settings that accept free-text provider; adding a new destination type in a fork while the factory only knows the four.","solutions":["Use one of: 's3', 'vantage', 'gcs', 'mavvrik' (any case)","Strip and normalize input before calling: provider.strip().lower()","Validate provider against the supported set at config-load time and fail early","For a custom destination, implement a FocusDestination subclass and construct it directly instead of via the factory"],"exampleFix":"# before\ndest = FocusDestinationFactory.create(provider='azure', prefix='focus/')\n\n# after\nprovider = 'azure '\nSUPPORTED = {'s3', 'vantage', 'gcs', 'mavvrik'}\nprovider = provider.strip().lower()\nif provider not in SUPPORTED:\n    raise ValueError(f'unsupported Focus provider {provider!r}; choose from {sorted(SUPPORTED)}')\ndest = FocusDestinationFactory.create(provider=provider, prefix='focus/')","handlingStrategy":"validation","validationCode":"SUPPORTED_FOCUS_PROVIDERS = {'s3', 'vantage', 'gcs', 'mavvrik'}\nprovider = (provider or '').strip().lower()\nif provider not in SUPPORTED_FOCUS_PROVIDERS:\n    raise ValueError(\n        f'unsupported Focus provider {provider!r}; choose from {sorted(SUPPORTED_FOCUS_PROVIDERS)}'\n    )\ndest = FocusDestinationFactory.create(provider=provider, prefix='focus/')","typeGuard":"def is_supported_focus_provider(provider: str) -> bool:\n    return (provider or '').strip().lower() in {'s3', 'vantage', 'gcs', 'mavvrik'}","tryCatchPattern":"try:\n    dest = FocusDestinationFactory.create(provider=provider, prefix='focus/')\nexcept NotImplementedError as e:\n    raise ValueError(f'config error: {e}') from e  # surface as config problem, not code gap","preventionTips":["Validate provider at config-load time against the supported set","Normalize input (strip + lower) before it reaches the factory","Pin the provider value in config rather than accepting free text from users"],"tags":["litellm","focus","export","provider","factory"],"backgroundTag":"unsupported-provider","analyzedSha":"77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8","analyzedAt":"2026-08-18T11:44:31.656Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}