{"record":{"id":"f1ef64073c4f5150","repo":"BerriAI/litellm","slug":"validate-environment-must-be-implemented-by-provid","errorCode":null,"errorMessage":"validate_environment must be implemented by provider","messagePattern":"validate_environment must be implemented by provider","errorType":"exception","errorClass":"NotImplementedError","httpStatus":null,"severity":"error","filePath":"litellm/llms/base_llm/sandbox/transformation.py","lineNumber":50,"sourceCode":"    \"\"\"Passthrough of the sandbox's own execution output.\"\"\"\n\n    stdout: str = \"\"\n    stderr: str = \"\"\n    results: list[dict[str, Any]] = Field(default_factory=list)\n    error: dict[str, Any] | None = None\n    execution_count: int | None = None\n    object: str = \"code_execution\"\n\n    model_config = {\"extra\": \"allow\"}\n\n    _hidden_params: dict = PrivateAttr(default_factory=dict)\n\n\nclass BaseSandboxConfig:\n    \"\"\"Provider-agnostic sandbox operations.\"\"\"\n\n    def validate_environment(self, api_key: str | None = None, **kwargs) -> str:\n        raise NotImplementedError(\"validate_environment must be implemented by provider\")\n\n    async def acreate_sandbox(\n        self,\n        *,\n        template: str | None = None,\n        timeout: int | None = None,\n        allow_internet_access: bool | None = None,\n        api_key: str | None = None,\n        **kwargs,\n    ) -> ContainerHandle:\n        raise NotImplementedError(\"acreate_sandbox must be implemented by provider\")\n\n    async def arun_code(\n        self,\n        *,\n        container: ContainerHandle | str,\n        code: str,\n        api_key: str | None = None,","sourceCodeStart":32,"sourceCodeEnd":68,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/llms/base_llm/sandbox/transformation.py#L32-L68","documentation":"Error \"validate_environment must be implemented by provider\" thrown in BerriAI/litellm.","triggerScenarios":"Thrown at litellm/llms/base_llm/sandbox/transformation.py:50 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use a provider that implements the sandbox interface; validate_environment is abstract.","Implement validate_environment in the custom sandbox provider's transformation class.","Check the model/provider name routes to a supported sandbox provider."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8","analyzedAt":"2026-08-18T11:44:31.656Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}