Skip to content

Commit 2ab8e80

Browse files
committed
fix(FR-2519): replace hardcoded 'model-definition.yaml' with undefined in ServingLauncherPage (#6591)
resolves #6589 (FR-2519) **Changes:** Modified the Service Launcher to send `undefined` for `modelDefinitionPath` when the field is left empty, instead of hardcoding the default value `'model-definition.yaml'`. This allows the server to infer the appropriate model definition path rather than forcing a specific filename. **Rationale:** Previously, empty `modelDefinitionPath` values were automatically converted to `'model-definition.yaml'` on the client side. By sending `undefined` instead, the server can now determine the most appropriate model definition file based on its own logic and the specific context of the service being launched. **Impact:** Users can now leave the model definition path field blank and rely on server-side inference for determining the correct model definition file, providing more flexibility in service configuration. **Checklist:** (if applicable) - [ ] Documentation - [ ] Minium required manager version - [ ] Specific setting for review (eg., KB link, endpoint or how to setup) - [ ] Minimum requirements to check during review - [ ] Test case(s) to demonstrate the difference of before/after
1 parent cad7b3b commit 2ab8e80

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

react/src/components/ServiceLauncherPageContent.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -630,9 +630,11 @@ const ServiceLauncherPageContent: React.FC<ServiceLauncherPageContentProps> = ({
630630
const trimmed = value?.trim();
631631
return trimmed && trimmed.length > 0 ? trimmed : fallback;
632632
};
633+
// If user leaves modelDefinitionPath empty, send undefined instead of
634+
// hardcoding 'model-definition.yaml' so the server can infer the value.
633635
const modelDefinitionPath = isCommandMode
634636
? 'model-definition.yaml'
635-
: normalizePath(values.modelDefinitionPath, 'model-definition.yaml');
637+
: values.modelDefinitionPath?.trim() || undefined;
636638
const modelMountDestination = isCommandMode
637639
? normalizePath(values.commandModelMount, '/models')
638640
: normalizePath(values.modelMountDestination, '/models');
@@ -920,7 +922,9 @@ const ServiceLauncherPageContent: React.FC<ServiceLauncherPageContentProps> = ({
920922
}),
921923
name: values.serviceName,
922924
resource_group: values.resourceGroup,
923-
model_definition_path: values.modelDefinitionPath,
925+
// If empty, let the server infer the value instead of hardcoding
926+
model_definition_path:
927+
values.modelDefinitionPath?.trim() || undefined,
924928
runtime_variant: values.runtimeVariant,
925929
},
926930
};

0 commit comments

Comments
 (0)