microsoft/graphrag · error · ValueError
StorageConfig.type '{storage_strategy}' is not registered in
Error message
StorageConfig.type '{storage_strategy}' is not registered in the StorageFactory. Registered types: {', '.join(storage_factory.keys())}. What it means
StorageFactory.register() lazily imports and registers storage backends per StorageType; the default branch fires when the requested type string matches no registered type and no lazy case. The message lists all currently registered types so you can see what the factory actually knows about.
Source
Thrown at packages/graphrag-storage/graphrag_storage/storage_factory.py:76
case StorageType.File:
from graphrag_storage.file_storage import FileStorage
register_storage(StorageType.File, FileStorage)
case StorageType.Memory:
from graphrag_storage.memory_storage import MemoryStorage
register_storage(StorageType.Memory, MemoryStorage)
case StorageType.AzureBlob:
from graphrag_storage.azure_blob_storage import AzureBlobStorage
register_storage(StorageType.AzureBlob, AzureBlobStorage)
case StorageType.AzureCosmos:
from graphrag_storage.azure_cosmos_storage import AzureCosmosStorage
register_storage(StorageType.AzureCosmos, AzureCosmosStorage)
case _:
msg = f"StorageConfig.type '{storage_strategy}' is not registered in the StorageFactory. Registered types: {', '.join(storage_factory.keys())}."
raise ValueError(msg)
return storage_factory.create(storage_strategy, config_model)
View on GitHub (pinned to f40e9a26ce)
Solutions
- Check the error's registered-types list and correct the type string to an exact match (use the StorageType enum, not a hand-typed string)
- For custom backends, call register_storage(YourType, YourClass) before create_storage
- If a builtin type is missing from the list, your graphrag-storage version may be old — upgrade
Example fix
# before config.type = "azure_cosmos" # after from graphrag_storage import StorageType config.type = StorageType.AzureCosmos.value
Defensive patterns
Strategy: validation
Validate before calling
from graphrag_storage import storage_factory
types = {t.value for t in StorageType}
assert cfg["type"] in storage_factory.keys() or cfg["type"] in types Type guard
def is_known_storage_type(t: str, registered: dict) -> bool:
return t in registered or t in {e.value for e in StorageType} Prevention
- Reference enum values instead of string literals in config
- Register custom backends at app bootstrap
When it happens
Trigger: Calling create_storage with a misspelled or unsupported type (e.g. "azure_cosmos" when the enum key differs, or "redis"), or a custom type that was never registered via register_storage before create_storage ran.
Common situations: Typos in settings.yaml type field; upgrading GraphRAG where StorageType members were renamed; third-party backend not imported/registered before factory use.
Related errors
- TableProviderConfig.type '{table_type}' is not registered in
- TemplateEngineConfig.template_manager '{strategy}' is not re
- TokenizerConfig.type '{strategy}' is not registered in the T
- ModelConfig.type '{strategy}' is not registered in the Compl
- MetricsConfig.processor '{strategy}' is not registered in th
AI-assisted analysis of microsoft/graphrag@f40e9a26ce (2026-08-27).
Data as JSON: /api/errors/40fac582b563edda.
Report an issue: GitHub.