fix: платформа поддержки HGX только для SXM/HGX GPU; актуализированы цены HGX по регламенту 2026-10-07

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
mchusandClaude Sonnet 5.5 committed 2026-10-14 10:45:51 +03:00
1 parent 8b073e63b1
commit d48865869a
4 files changed
+29 -26

No files matched your search

+10 -7
View File
@@ -2365,19 +2365,22 @@ function findSupportCartIndex() {
return cart.findIndex(i => (i.lot_name || '').toUpperCase().startsWith('SVC_'));
}
// Mirrors the GPU chip-generation classification used by internal/services/rental.go,
// so the support picker and the rental calc agree on which platform a config is.
// HGX = SXM baseboard servers. Plain PCIe GPUs (A30, L40, H200 NVL PCIe, ...) in a regular
// server keep the x86 percent-of-price support model.
function detectSupportPlatform() {
const actualGenSubstrings = ['H200', 'B200', 'B300', 'BLACKWELL SE'];
let sawGPU = false;
let platform = 'x86';
for (const item of cart) {
if ((item.category || '').toUpperCase() !== 'GPU') continue;
sawGPU = true;
const upperLot = (item.lot_name || '').toUpperCase();
const isPCIe = upperLot.includes('PCIE');
const isHGX = upperLot.includes('HGX') || upperLot.includes('SXM') ||
(!isPCIe && /(H100|H200|B200|B300)/.test(upperLot));
if (!isHGX) continue;
if (upperLot.includes('B300')) return 'HGX-B300';
if (upperLot.includes('B200')) return 'HGX-B200';
if (upperLot.includes('B200')) platform = 'HGX-B200';
else if (platform === 'x86') platform = 'HGX-H200';
}
return sawGPU ? 'HGX-H200' : 'x86';
return platform;
}
// cartTotal excludes any existing support line so the x86 percent is based on hardware only.