{"record":{"id":"37249012fe3b206a","repo":"BerriAI/litellm","slug":"api-base-is-required-372490","errorCode":null,"errorMessage":"api_base is required","messagePattern":"api_base is required","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"litellm/llms/base_llm/containers/transformation.py","lineNumber":97,"sourceCode":"        self,\n        headers: dict,\n        api_key: str | None = None,\n    ) -> dict:\n        return {}\n\n    @abstractmethod\n    def get_complete_url(\n        self,\n        api_base: str | None,\n        litellm_params: dict,\n    ) -> str:\n        \"\"\"Get the complete url for the request.\n\n        OPTIONAL - Some providers need `model` in `api_base`.\n        \"\"\"\n        if api_base is None:\n            msg: Final = \"api_base is required\"\n            raise ValueError(msg)\n        return api_base\n\n    @abstractmethod\n    def transform_container_create_request(\n        self,\n        name: str,\n        container_create_optional_request_params: dict,\n        litellm_params: GenericLiteLLMParams,\n        headers: dict,\n    ) -> dict:\n        \"\"\"Transform the container creation request.\n\n        Returns:\n            dict: Request data for container creation.\n        \"\"\"\n        ...\n\n    @abstractmethod","sourceCodeStart":79,"sourceCodeEnd":115,"githubUrl":"https://github.com/BerriAI/litellm/blob/6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d/litellm/llms/base_llm/containers/transformation.py#L79-L115","documentation":"The abstract containers transformation's default get_complete_url requires an api_base: container operations (create/manage provider containers) must hit a concrete endpoint, and unlike chat there is no default host. None is rejected with a plain ValueError.","triggerScenarios":"Invoking the containers API (e.g. litellm container create/delete via a provider whose config does not override this method) without api_base in litellm_params or the call.","commonSituations":"New/experimental container integrations where the config class relies on the default; proxy vector-store/container config missing the endpoint; assuming the endpoint is derived from api_key or provider name.","solutions":["Pass api_base for the container operation in litellm_params","If writing a custom provider container config, override get_complete_url to construct the full URL from your provider's env vars","Check the provider's container docs for the expected endpoint shape and set it explicitly"],"exampleFix":"# before\nlitellm_params={'api_key': k}\ncontainer_client.create_container(name='docs', litellm_params=litellm_params)\n\n# after\nlitellm_params={'api_key': k, 'api_base': 'https://my-resource.example.com/api'}\ncontainer_client.create_container(name='docs', litellm_params=litellm_params)","handlingStrategy":"validation","validationCode":"if not litellm_params.get('api_base'):\n    raise ValueError('Container operations require api_base in litellm_params')","typeGuard":null,"tryCatchPattern":null,"preventionTips":["When adding a custom container provider, override get_complete_url rather than relying on the default","Validate container configs at startup alongside vector-store configs"],"tags":["containers","configuration","url","missing-parameter"],"backgroundTag":null,"analyzedSha":"6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d","analyzedAt":"2026-08-15T07:12:03.035Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}