diff --git a/api/schema/imageBuilder.yaml b/api/schema/imageBuilder.yaml index 5541eecc..e458566d 100644 --- a/api/schema/imageBuilder.yaml +++ b/api/schema/imageBuilder.yaml @@ -1567,6 +1567,10 @@ components: type: integer format: int32 default: 3 + distribution: + type: string + description: RHEL major release (e.g. "rhel8", "rhel9", "rhel10") + example: "rhel9" RecommendationsResponse: required: - packages @@ -1576,6 +1580,10 @@ components: type: array items: type: string + modelVersion: + type: string + description: Version of the recommendation model used + example: "rpm_rex_42" ClonesResponse: required: - meta diff --git a/src/Components/CreateImageWizard/steps/Packages/PackageRecommendations.tsx b/src/Components/CreateImageWizard/steps/Packages/PackageRecommendations.tsx index 0368e241..0beb6154 100644 --- a/src/Components/CreateImageWizard/steps/Packages/PackageRecommendations.tsx +++ b/src/Components/CreateImageWizard/steps/Packages/PackageRecommendations.tsx @@ -82,6 +82,7 @@ const PackageRecommendations = () => { recommendPackageRequest: { packages: packages.map((pkg) => pkg.name), recommendedPackages: 5, + distribution: distribution.replace('-', ''), }, }); @@ -98,6 +99,7 @@ const PackageRecommendations = () => { isPreview: isBeta(), shownRecommendations: response.data.packages, selectedPackages: packages.map((pkg) => pkg.name), + distribution: distribution.replace('-', ''), } ); } @@ -266,6 +268,7 @@ const PackageRecommendations = () => { (pkg) => pkg.name ), shownRecommendations: data.packages, + distribution: distribution.replace('-', ''), } ); addRecommendedPackage(pkg); diff --git a/src/store/service/imageBuilderApi.ts b/src/store/service/imageBuilderApi.ts index 5ab06f45..dc36c493 100644 --- a/src/store/service/imageBuilderApi.ts +++ b/src/store/service/imageBuilderApi.ts @@ -998,10 +998,14 @@ export type DistributionProfileItem = export type DistributionProfileResponse = DistributionProfileItem[]; export type RecommendationsResponse = { packages: string[]; + /** Version of the recommendation model used */ + modelVersion?: string | undefined; }; export type RecommendPackageRequest = { packages: string[]; recommendedPackages: number; + /** RHEL major release (e.g. "rhel8", "rhel9", "rhel10") */ + distribution?: string | undefined; }; export const { useGetArchitecturesQuery,