zylon-ai/private-gpt · error · ValueError
Unsupported storage provider: {provider}
Error message
Unsupported storage provider: {provider} What it means
Raised by StorageComponent when the provider string does not match "local" or "s3" in the match statement. It exists to catch misspelled or outdated provider names at creation time instead of silently falling through. The invalid value is interpolated into the message.
Source
Thrown at private_gpt/components/storage/storage_component.py:52
return storage
match provider:
case "local":
if local_root_path is None:
raise ValueError(
"Local storage provider requires local_root_path"
)
storage = LocalObjectStorage(root_path=local_root_path)
case "s3":
if bucket_name is None:
raise ValueError("S3 storage provider requires bucket_name")
storage = S3ObjectStorage(
s3_helper=self._injector.get(S3Helper),
bucket_name=bucket_name,
)
case _:
raise ValueError(f"Unsupported storage provider: {provider}")
self._storages[key] = storage
return storage
View on GitHub (pinned to 4a030776a3)
Solutions
- Set the provider to exactly "local" or "s3" (lowercase) in configuration
- Check for stray whitespace or casing in the configured value (e.g. ' s3' or 'S3')
- If you need another backend, implement an ObjectStorage subclass and extend the match arms rather than passing an unknown string
Example fix
# before storage: provider: filesystem # after storage: provider: local local_root_path: /var/lib/private_gpt/local_storage
Defensive patterns
Strategy: type-guard
Validate before calling
SUPPORTED_PROVIDERS = {"local", "s3"}
if settings.storage.provider not in SUPPORTED_PROVIDERS:
raise ValueError(f"provider must be one of {sorted(SUPPORTED_PROVIDERS)}") Type guard
def is_supported_provider(provider: str) -> bool:
return provider in {"local", "s3"} Prevention
- Normalize provider strings with .strip().lower() before use
- Pin supported values in config schema/docs so typos fail at lint time
When it happens
Trigger: Calling get_storage with any provider other than exactly "local" or "s3" (e.g. "Local", "filesystem", "gcs", "azure"). Also triggered by config drift after upgrading, when a removed provider name is still in settings.
Common situations: Case mismatch in YAML (Local vs local); copy-paste from docs of a different storage abstraction; attempting to use an object-store backend the component never supported.
Related errors
- Local storage provider requires local_root_path
- S3 storage provider requires bucket_name
- TOOL_NAME_CONFLICT
- INVALID_REQUEST_ERROR
- LLM mode '{mode}' is not supported. Available: {available}
AI-assisted analysis of zylon-ai/private-gpt@4a030776a3 (2026-08-15).
Data as JSON: /api/errors/c5696bb4e0c95ed9.
Report an issue: GitHub.