diff --git a/x-pack/packages/ml/trained_models_utils/src/constants/trained_models.ts b/x-pack/packages/ml/trained_models_utils/src/constants/trained_models.ts index caf4ce56b3482..95337518361e9 100644 --- a/x-pack/packages/ml/trained_models_utils/src/constants/trained_models.ts +++ b/x-pack/packages/ml/trained_models_utils/src/constants/trained_models.ts @@ -265,6 +265,19 @@ export type InferenceServiceSettings = url: string; }; } + | { + service: 'alibabacloud-ai-search'; + service_settings: { + api_key: string; + service_id: string; + host: string; + workspace: string; + http_schema: 'https' | 'http'; + rate_limit: { + requests_per_minute: number; + }; + }; + } | { service: 'amazonbedrock'; service_settings: { diff --git a/x-pack/plugins/search_inference_endpoints/public/assets/images/providers/alibaba_cloud_ai_search.svg b/x-pack/plugins/search_inference_endpoints/public/assets/images/providers/alibaba_cloud_ai_search.svg new file mode 100644 index 0000000000000..18534e2d0b3a1 --- /dev/null +++ b/x-pack/plugins/search_inference_endpoints/public/assets/images/providers/alibaba_cloud_ai_search.svg @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + diff --git a/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_service_provider/service_provider.test.tsx b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_service_provider/service_provider.test.tsx index bcb6599632177..202e914e33a35 100644 --- a/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_service_provider/service_provider.test.tsx +++ b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_service_provider/service_provider.test.tsx @@ -268,4 +268,24 @@ describe('ServiceProvider component', () => { expect(screen.getByText('model-bedrock-xyz')).toBeInTheDocument(); }); }); + + describe('with alibabacloud-ai-search service', () => { + const mockEndpoint = { + inference_id: 'alibabacloud-ai-search-1', + service: 'alibabacloud-ai-search', + service_settings: { + service_id: 'service-123', + host: 'host-123', + workspace: 'default-123', + }, + } as any; + + it('renders the component with endpoint details', () => { + render(); + + expect(screen.getByText('AlibabaCloud AI Search')).toBeInTheDocument(); + const icon = screen.getByTestId('table-column-service-provider-alibabacloud-ai-search'); + expect(icon).toBeInTheDocument(); + }); + }); }); diff --git a/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_service_provider/service_provider.tsx b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_service_provider/service_provider.tsx index b926f590335fb..574b3881f121b 100644 --- a/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_service_provider/service_provider.tsx +++ b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_service_provider/service_provider.tsx @@ -20,6 +20,7 @@ import azureOpenAIIcon from '../../../../assets/images/providers/azure_open_ai.s import googleAIStudioIcon from '../../../../assets/images/providers/google_ai_studio.svg'; import mistralIcon from '../../../../assets/images/providers/mistral.svg'; import amazonBedrockIcon from '../../../../assets/images/providers/amazon_bedrock.svg'; +import alibabaCloudAISearchIcon from '../../../../assets/images/providers/alibaba_cloud_ai_search.svg'; import { ServiceProviderKeys } from '../../types'; import * as i18n from './translations'; @@ -33,6 +34,10 @@ interface ServiceProviderRecord { } export const SERVICE_PROVIDERS: Record = { + [ServiceProviderKeys['alibabacloud-ai-search']]: { + icon: alibabaCloudAISearchIcon, + name: 'AlibabaCloud AI Search', + }, [ServiceProviderKeys.amazonbedrock]: { icon: amazonBedrockIcon, name: 'Amazon Bedrock', diff --git a/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/types.ts b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/types.ts index 0a5da7288607d..6fb4cb0bcca6b 100644 --- a/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/types.ts +++ b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/types.ts @@ -10,6 +10,7 @@ import { TaskTypes } from '../../types'; export const INFERENCE_ENDPOINTS_TABLE_PER_PAGE_VALUES = [25, 50, 100]; export enum ServiceProviderKeys { + 'alibabacloud-ai-search' = 'alibabacloud-ai-search', amazonbedrock = 'amazonbedrock', azureopenai = 'azureopenai', azureaistudio = 'azureaistudio',