zylon-ai/private-gpt · error · ValueError
Code execution provider '{name}' is not registered. Availabl
Error message
Code execution provider '{name}' is not registered. Available: {available} What it means
The code-execution registry resolves provider names lazily: it checks its instance cache, then the module-level _PROVIDERS factory map. This ValueError means the requested name is in neither, i.e. the settings reference a provider that this build does not register (typo, renamed provider, or optional provider not compiled in).
Source
Thrown at private_gpt/components/code_execution/registry.py:32
name: str, provider: CodeExecutionProviderFactory
) -> None:
_PROVIDERS[name] = provider
class CodeExecutionProviderRegistry:
def __init__(self, settings: Settings) -> None:
self._settings = settings
self._providers: dict[str, CodeExecutionProvider] = {}
def get_provider(self, name: str) -> CodeExecutionProvider:
provider = self._providers.get(name)
if provider is not None:
return provider
provider_factory = _PROVIDERS.get(name)
if provider_factory is None:
available = ", ".join(sorted(_PROVIDERS)) or "none"
raise ValueError(
"Code execution provider "
f"'{name}' is not registered. Available: {available}"
)
provider = provider_factory(self._settings)
self._providers[name] = provider
return provider
View on GitHub (pinned to 4a030776a3)
Solutions
- Read the error message: it enumerates the available providers — use one of those names
- Fix the typo in the code-execution provider setting
- If the provider should exist, check you're on a version that ships it and its extras are installed
- Validate the provider name at startup against the registry instead of failing on first use
Example fix
# before (settings) code_execution: provider: "dockr" # typo # after code_execution: provider: "docker" # must be one of the names listed in the error
Defensive patterns
Strategy: validation
Validate before calling
from private_gpt.components.code_execution.registry import _PROVIDERS # or a public listing API
name = settings.code_execution.provider
assert name in _PROVIDERS, f"unknown provider {name!r}; available: {sorted(_PROVIDERS)}" Type guard
def is_registered_provider(name: str) -> bool:
return name in _PROVIDERS Try / catch
try:
provider = registry.get_provider(name)
except ValueError as e:
if "is not registered" in str(e):
raise ConfigError(str(e)) from e # surface as deployment misconfiguration
raise Prevention
- Validate provider names against the registry at startup, not first use
- Pin the provider list in deployment docs per version
- After upgrades, re-check that configured provider names still exist
When it happens
Trigger: Calling registry.get_provider(name) with settings.code_execution.provider set to a name absent from _PROVIDERS (the message lists valid names).
Common situations: Typo in the provider setting ('e2b' vs 'sandbox'); upgrading to a version where a provider was renamed or moved behind an optional dependency; copying config between environments with different extras installed.
Related errors
- Sandbox provider '{name}' is not registered. Available: {ava
- Unsupported semaphore mode: {mode!r}. Available: {', '.join(
- Embedding mode '{mode}' is not supported. Available: {availa
- LLM mode '{mode}' is not supported. Available: {available}
- Model '{target_model}' not found. Available: {available}
AI-assisted analysis of zylon-ai/private-gpt@4a030776a3 (2026-08-15).
Data as JSON: /api/errors/7f5146822e12cef3.
Report an issue: GitHub.