{"record":{"id":"c0ae4adbe0f1d87c","repo":"langchain-ai/deepagents","slug":"sandbox-provider-name-config-is-missing-class","errorCode":null,"errorMessage":"Sandbox provider '{name}' config is missing 'class_path'","messagePattern":"Sandbox provider '(.+?)' config is missing 'class_path'","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"libs/code/deepagents_code/integrations/sandbox_registry.py","lineNumber":281,"sourceCode":"\n        Args:\n            name: Provider name.\n\n        Returns:\n            A `SandboxProvider` instance. Propagates `ImportError` from\n                `_load_class` / `EntryPoint.load` if a config or entry-point\n                class cannot be imported.\n\n        Raises:\n            ValueError: If `name` is unknown or a config provider omits\n                `class_path`.\n        \"\"\"\n        config_entry = self._config.providers.get(name)\n        if config_entry is not None:\n            class_path = config_entry.get(\"class_path\")\n            if not class_path:\n                msg = f\"Sandbox provider '{name}' config is missing 'class_path'\"\n                raise ValueError(msg)\n            return _load_class(class_path)()\n\n        entry = self._entry_points.get(name)\n        if entry is not None:\n            return entry.load()()\n\n        if name in BUILTIN_METADATA:\n            return _create_builtin_provider(name)\n\n        msg = (\n            f\"Unknown sandbox provider: {name}. \"\n            f\"Available providers: {', '.join(self.available_providers())}\"\n        )\n        raise ValueError(msg)\n\n    def provider_metadata(self, name: str) -> SandboxProviderMetadata:\n        \"\"\"Return authoritative metadata for `name`.\n","sourceCodeStart":263,"sourceCodeEnd":299,"githubUrl":"https://github.com/langchain-ai/deepagents/blob/a1af029e6e73cb17c36bff823d227747b28e91e1/libs/code/deepagents_code/integrations/sandbox_registry.py#L263-L299","documentation":"`SandboxRegistry.create_provider` looks up a provider in config, entry points, then builtins. If a config entry exists for `name` but lacks a truthy `class_path` key, the registry cannot instantiate it and raises ValueError immediately.","triggerScenarios":"A config file (or dict) registering provider `name` as e.g. `{'myp': {}}` or `{'myp': {'class_path': None}}`, then calling `create_provider('myp')` (directly or via `_get_provider`/`provider_metadata`).","commonSituations":"Hand-editing the sandbox config and omitting `class_path`, a config migration/tool writing empty entries, YAML/JSON nesting mistakes that drop the key.","solutions":["Add the `class_path` key in `module.path:ClassName` format to the provider's config entry.","Remove the empty config entry so the registry falls back to entry points/builtins.","Validate the config structure at startup before handing it to the registry."],"exampleFix":"# before\nproviders:\n  myprov: {}\n# after\nproviders:\n  myprov:\n    class_path: \"mypkg.providers:MyProvider\"","handlingStrategy":"validation","validationCode":"def config_entries_valid(config: dict) -> bool:\n    return all(\n        isinstance(entry, dict) and entry.get('class_path')\n        for entry in config.get('providers', {}).values()\n    )","typeGuard":null,"tryCatchPattern":"try:\n    provider = registry.create_provider(name)\nexcept ValueError as exc:\n    if \"missing 'class_path'\" in str(exc):\n        raise ConfigError(f\"Provider '{name}' needs a class_path in config\") from exc\n    raise","preventionTips":["Validate provider config shape at load time","Never write empty provider entries; omit them entirely","Keep a schema/typed model for the sandbox config file"],"tags":["python","config","sandbox","validation"],"backgroundTag":"missing-config-key","analyzedSha":"a1af029e6e73cb17c36bff823d227747b28e91e1","analyzedAt":"2026-08-29T11:43:24.718Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}