{"record":{"id":"c97a53b410c7a382","repo":"BerriAI/litellm","slug":"gemini-api-base-is-not-set","errorCode":null,"errorMessage":"GEMINI_API_BASE is not set","messagePattern":"GEMINI_API_BASE is not set","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"litellm/llms/gemini/vector_stores/transformation.py","lineNumber":91,"sourceCode":"            api_key: Final = litellm_params.get(\"api_key\") or get_api_key_from_env()\n            if api_key:\n                self._cached_api_key = api_key\n                headers[\"x-goog-api-key\"] = api_key\n\n        return headers\n\n    def get_complete_url(self, api_base: str | None, litellm_params: dict) -> str:\n        \"\"\"\n        Get the complete base URL for Gemini API.\n\n        Note: This returns the base URL WITHOUT the API key.\n        The API key will be appended to specific endpoint URLs in the transform methods.\n        \"\"\"\n        if api_base is None:\n            api_base = GeminiModelInfo.get_api_base()\n\n        if api_base is None:\n            raise ValueError(\"GEMINI_API_BASE is not set\")\n\n        # Ensure we're using the v1beta version for File Search\n        api_version: Final = \"v1beta\"\n        return f\"{api_base}/{api_version}\"\n\n    def get_error_class(self, error_message: str, status_code: int, headers: dict | httpx.Headers) -> GeminiError:\n        \"\"\"Return Gemini-specific error class.\"\"\"\n        return GeminiError(\n            status_code=status_code,\n            message=error_message,\n            headers=headers,\n        )\n\n    def transform_search_vector_store_request(\n        self,\n        vector_store_id: str,\n        query: str | list[str],\n        vector_store_search_optional_params: VectorStoreSearchOptionalRequestParams,","sourceCodeStart":73,"sourceCodeEnd":109,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/llms/gemini/vector_stores/transformation.py#L73-L109","documentation":"Error \"GEMINI_API_BASE is not set\" thrown in BerriAI/litellm.","triggerScenarios":"Thrown at litellm/llms/gemini/vector_stores/transformation.py:91 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set the GEMINI_API_BASE environment variable, or pass api_base explicitly."],"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"}