{"record":{"id":"3aab71c330f20cdf","repo":"BerriAI/litellm","slug":"azure-ai-search-service-name-is-required-provide","errorCode":null,"errorMessage":"Azure AI Search service name is required. Provide it via litellm_params['azure_search_service_name'] or api_base parameter","messagePattern":"Azure AI Search service name is required\\. Provide it via litellm_params\\['azure_search_service_name'\\] or api_base parameter","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"litellm/llms/azure_ai/vector_stores/transformation.py","lineNumber":101,"sourceCode":"\n    def get_complete_url(\n        self,\n        api_base: str | None,\n        litellm_params: dict,\n    ) -> str:\n        \"\"\"\n        Get the base endpoint for Azure AI Search API\n\n        Expected format: https://{search_service_name}.search.windows.net\n        \"\"\"\n        if api_base:\n            return api_base.rstrip(\"/\")\n\n        # Get search service name from litellm_params\n        search_service_name: Final = litellm_params.get(\"azure_search_service_name\")\n\n        if not search_service_name:\n            raise ValueError(\n                \"Azure AI Search service name is required. \"\n                \"Provide it via litellm_params['azure_search_service_name'] or api_base parameter\"\n            )\n\n        # Azure AI Search endpoint\n        return f\"https://{search_service_name}.search.windows.net\"\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,\n        api_base: str,\n        litellm_logging_obj: LiteLLMLoggingObj,\n        litellm_params: dict,\n        extra_body: dict[str, Any] | None = None,\n    ) -> tuple[str, dict[str, Any]]:\n        \"\"\"","sourceCodeStart":83,"sourceCodeEnd":119,"githubUrl":"https://github.com/BerriAI/litellm/blob/6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d/litellm/llms/azure_ai/vector_stores/transformation.py#L83-L119","documentation":"To build the Azure AI Search endpoint (https://<name>.search.windows.net), the vector-store config needs either a full api_base or the search service name. get_base_endpoint raises when api_base is empty and litellm_params['azure_search_service_name'] is missing/empty.","triggerScenarios":"Using the azure_ai_search vector store provider with litellm_params containing neither api_base nor azure_search_service_name — e.g. only api_key was configured.","commonSituations":"Assuming the service name is inferred from the API key or index name; passing the full endpoint under a key the config doesn't read (e.g. endpoint instead of api_base); typos like azure_search_service.","solutions":["Set litellm_params['azure_search_service_name'] = 'my-search-service' (just the name, not the full URL)","Or provide the full endpoint: litellm_params['api_base'] = 'https://my-search-service.search.windows.net'","Double-check the exact key spelling — azure_search_service_name"],"exampleFix":"# before\nlitellm_params={'api_key': key}\n\n# after\nlitellm_params={'api_key': key, 'azure_search_service_name': 'my-search-service'}","handlingStrategy":"validation","validationCode":"if not (litellm_params.get('api_base') or litellm_params.get('azure_search_service_name')):\n    raise ValueError('Provide azure_search_service_name or api_base for azure_ai_search')","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Store the search service name alongside the key in one config object","Prefer passing the full api_base to remove ambiguity"],"tags":["azure","vector-stores","azure-search","configuration"],"backgroundTag":null,"analyzedSha":"6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d","analyzedAt":"2026-08-15T07:12:03.035Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}