{"record":{"id":"c22512b55baea617","repo":"BerriAI/litellm","slug":"api-base-is-required-for-openai-like-provider","errorCode":null,"errorMessage":"api_base is required for openai_like provider","messagePattern":"api_base is required for openai_like provider","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"litellm/llms/openai_like/responses/transformation.py","lineNumber":49,"sourceCode":"        self,\n        headers: dict,\n        model: str,\n        litellm_params: GenericLiteLLMParams | None,\n    ) -> dict:\n        litellm_params = litellm_params or GenericLiteLLMParams()\n        api_key: Final = litellm_params.api_key or get_secret_str(\"OPENAI_LIKE_API_KEY\")\n        if api_key:\n            headers[\"Authorization\"] = f\"Bearer {api_key}\"\n        return headers\n\n    def get_complete_url(\n        self,\n        api_base: str | None,\n        litellm_params: dict,\n    ) -> str:\n        api_base = api_base or get_secret_str(\"OPENAI_LIKE_API_BASE\")\n        if not api_base:\n            raise ValueError(\"api_base is required for openai_like provider\")\n        api_base = api_base.rstrip(\"/\")\n        return f\"{api_base}/responses\"\n","sourceCodeStart":31,"sourceCodeEnd":52,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/llms/openai_like/responses/transformation.py#L31-L52","documentation":"Configuration guard in the OpenAI-like responses-API transformation: neither the api_base argument nor the OPENAI_LIKE_API_BASE secret is set, so there is no host to append the responses endpoint path to and the request is rejected upfront.","triggerScenarios":"Thrown at litellm/llms/openai_like/responses/transformation.py:49 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass api_base for the openai_like provider, via parameter or environment variable."],"exampleFix":null,"handlingStrategy":"validation","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-14T05:17:10.506Z"}