diff --git a/frontend/src/__tests__/cypress/cypress/tests/mocked/modelRegistry/modelVersionDetails.cy.ts b/frontend/src/__tests__/cypress/cypress/tests/mocked/modelRegistry/modelVersionDetails.cy.ts index 3a0e6917e0..d9453f156a 100644 --- a/frontend/src/__tests__/cypress/cypress/tests/mocked/modelRegistry/modelVersionDetails.cy.ts +++ b/frontend/src/__tests__/cypress/cypress/tests/mocked/modelRegistry/modelVersionDetails.cy.ts @@ -415,6 +415,7 @@ describe('Model version details', () => { cy.wait('@updateModelFormat').then((interception) => { expect(interception.request.body).to.deep.equal({ modelFormatName: 'UpdatedFormat', + artifactType: 'model-artifact', }); }); }); @@ -439,6 +440,7 @@ describe('Model version details', () => { cy.wait('@updateModelVersion').then((interception) => { expect(interception.request.body).to.deep.equal({ modelFormatVersion: '2.0.0', + artifactType: 'model-artifact', }); }); }); diff --git a/frontend/src/pages/modelRegistry/screens/ModelVersionDetails/ModelVersionDetailsView.tsx b/frontend/src/pages/modelRegistry/screens/ModelVersionDetails/ModelVersionDetailsView.tsx index 7bf00b05e0..08c94be3cf 100644 --- a/frontend/src/pages/modelRegistry/screens/ModelVersionDetails/ModelVersionDetailsView.tsx +++ b/frontend/src/pages/modelRegistry/screens/ModelVersionDetails/ModelVersionDetailsView.tsx @@ -168,7 +168,11 @@ const ModelVersionDetailsView: React.FC = ({ value={modelArtifact?.modelFormatName || ''} saveEditedValue={(value) => apiState.api - .patchModelArtifact({}, { modelFormatName: value }, modelArtifact?.id || '') + .patchModelArtifact( + {}, + { modelFormatName: value, artifactType: modelArtifact?.artifactType }, + modelArtifact?.id || '', + ) .then(() => { refreshModelArtifacts(); }) @@ -183,7 +187,11 @@ const ModelVersionDetailsView: React.FC = ({ isArchive={isArchiveVersion} saveEditedValue={(newVersion) => apiState.api - .patchModelArtifact({}, { modelFormatVersion: newVersion }, modelArtifact?.id || '') + .patchModelArtifact( + {}, + { modelFormatVersion: newVersion, artifactType: modelArtifact?.artifactType }, + modelArtifact?.id || '', + ) .then(() => { refreshModelArtifacts(); })