@@ -963,6 +963,66 @@ paths:
963963 summary : Delete a Model Catalog source
964964 description : Deletes an existing Model Catalog Source.
965965
966+ /api/v1/settings/model_catalog/source_preview :
967+ description : >-
968+ The REST endpoint/path used to preview the effects of catalog source configuration changes.
969+ post :
970+ summary : Preview catalog source configuration effects
971+ description : >-
972+ Accepts catalog source definitions and returns a preview of which models would be
973+ included or excluded based on the configuration. Supports multipart form uploads
974+ for YAML catalogs files.
975+ tags :
976+ - ModelCatalogService
977+ parameters :
978+ - name : statusFilter
979+ description : |-
980+ Filter the response to show specific model statuses.
981+ - `all` shows all models (default)
982+ - `included` shows only models that would be included
983+ - `excluded` shows only models that would be excluded
984+ schema :
985+ type : string
986+ enum :
987+ - all
988+ - included
989+ - excluded
990+ default : all
991+ in : query
992+ required : false
993+ - $ref : " #/components/parameters/pageSize"
994+ - $ref : " #/components/parameters/nextPageToken"
995+ requestBody :
996+ description : Catalog source configuration
997+ required : true
998+ content :
999+ application/json :
1000+ schema :
1001+ $ref : " #/components/schemas/CatalogSourcePreviewRequest"
1002+ multipart/form-data :
1003+ schema :
1004+ type : object
1005+ properties :
1006+ file :
1007+ type : string
1008+ format : yaml
1009+ description :
1010+ type : string
1011+ description :
1012+ Should include a file named `source.json`, and may optionally
1013+ include a YAML catalog. The name referenced in the source
1014+ definition should match uploaded file name.
1015+ responses :
1016+ " 200 " :
1017+ $ref : " #/components/responses/CatalogSourcePreviewResponse"
1018+ " 400 " :
1019+ $ref : " #/components/responses/BadRequest"
1020+ " 401 " :
1021+ $ref : " #/components/responses/Unauthorized"
1022+ " 500 " :
1023+ $ref : " #/components/responses/InternalServerError"
1024+ operationId : previewCatalogSource
1025+
9661026components :
9671027 schemas :
9681028 Config :
@@ -2085,6 +2145,76 @@ components:
20852145 description : A single filter option.
20862146 additionalProperties :
20872147 $ref : " #/components/schemas/FilterOption"
2148+ CatalogSourcePreviewRequest :
2149+ description : Request to preview catalog source configuration effects.
2150+ type : object
2151+ required :
2152+ - type
2153+ properties :
2154+ type :
2155+ type : string
2156+ description : The type of catalog source (e.g., 'huggingface', 'yaml')
2157+ example : yaml
2158+ includedModels :
2159+ type : array
2160+ items :
2161+ type : string
2162+ excludedModels :
2163+ type : array
2164+ items :
2165+ type : string
2166+ properties :
2167+ type : object
2168+ description : Type-specific configuration properties
2169+ additionalProperties : true
2170+ CatalogSourcePreviewModel :
2171+ description : A model in the preview response with inclusion status.
2172+ type : object
2173+ required :
2174+ - name
2175+ - included
2176+ properties :
2177+ name :
2178+ type : string
2179+ description : Name of the model
2180+ example : microsoft/DialoGPT-medium
2181+ included :
2182+ type : boolean
2183+ description : Whether this model would be included based on the source configuration
2184+ CatalogSourcePreviewResult :
2185+ description : Preview result for catalog source configuration.
2186+ allOf :
2187+ - type : object
2188+ properties :
2189+ items :
2190+ description : Array of models with their inclusion status.
2191+ type : array
2192+ items :
2193+ $ref : " #/components/schemas/CatalogSourcePreviewModel"
2194+ summary :
2195+ description : Summary of the preview results
2196+ type : object
2197+ properties :
2198+ totalModels :
2199+ type : integer
2200+ description : Total number of models evaluated
2201+ example : 1500
2202+ includedModels :
2203+ type : integer
2204+ description : Number of models that would be included
2205+ example : 850
2206+ excludedModels :
2207+ type : integer
2208+ description : Number of models that would be excluded
2209+ example : 650
2210+ required :
2211+ - totalModels
2212+ - includedModels
2213+ - excludedModels
2214+ required :
2215+ - items
2216+ - summary
2217+ - $ref : " #/components/schemas/BaseResourceList"
20882218
20892219 # Schema for catalog settings
20902220 CatalogSourceConfig :
@@ -2501,6 +2631,12 @@ components:
25012631 schema :
25022632 $ref : " #/components/schemas/FilterOptionsList"
25032633 description : A response containing options for a `filterQuery` parameter.
2634+ CatalogSourcePreviewResponse :
2635+ content :
2636+ application/json :
2637+ schema :
2638+ $ref : " #/components/schemas/CatalogSourcePreviewResult"
2639+ description : A response containing the preview results of catalog source configuration effects.
25042640
25052641 # Catalog settings response
25062642 CatalogSourceConfigListResponse :
0 commit comments