diff --git a/static/js/cookbookServe.js b/static/js/cookbookServe.js
index 5a5d6dfc1..099da1779 100644
--- a/static/js/cookbookServe.js
+++ b/static/js/cookbookServe.js
@@ -1258,7 +1258,7 @@ function _rerenderCachedModels() {
// stays as the source-of-truth so every existing change handler
// (updateBackendVisibility, runtime readiness, command builder)
// still fires via dispatchEvent('change') on selection.
- panelHtml += ``;
+ panelHtml += ``;
panelHtml += ``;
// Inference mode pill (llama.cpp only) — lives directly to the
// RIGHT of Backend in Row 1 so the engine and the GPU/CPU choice
@@ -1383,10 +1383,9 @@ function _rerenderCachedModels() {
// tuning, or any other KEY=VALUE pair that doesn't have a dedicated
// field. After the venv activate runs, $VIRTUAL_ENV / $PATH / etc. are
// already exported so they expand correctly here.
- // grid-column: 1 / -1 makes Env span every column of the Advanced
- // row's CSS grid (the old flex:1 1 100% did nothing in a grid
- // container — left an empty trailing column gap on wide modals).
- panelHtml += ``;
+ // CSS places this beside vLLM's Env Preset, but lets it span the full
+ // row for SGLang where that preset field is hidden.
+ panelHtml += ``;
panelHtml += ``;
// Row 2b: Diffusers settings
const diffDtypeOpts = ['bfloat16','float16','float32'].map(d => ``).join('');
@@ -1937,6 +1936,7 @@ function _rerenderCachedModels() {
function updateBackendVisibility() {
const b = panel.querySelector('[data-field="backend"]')?.value || 'vllm';
+ panel.dataset.backendActive = b;
panel.querySelectorAll('[class*="hwfit-backend-"]').forEach(el => {
// Skip the entire backend-picker subtree — the picker's own
// classes (`hwfit-backend-picker`, `-btn`, `-menu`, `-item`,
diff --git a/static/style.css b/static/style.css
index 336fe5332..edfb49d89 100644
--- a/static/style.css
+++ b/static/style.css
@@ -20339,10 +20339,16 @@ body.gallery-selecting .gallery-dl-btn,
.hwfit-sf[data-field="backend"],
.hwfit-sf[data-field="dtype"],
.hwfit-sf[data-field="tp"] {
- height: 28px;
+ height: 32px;
box-sizing: border-box;
width: 100%;
}
+.hwfit-extra-env-label {
+ grid-column: 1 / -1;
+}
+.hwfit-serve-panel[data-backend-active="vllm"] .hwfit-extra-env-label {
+ grid-column: 2 / -1;
+}
.hwfit-sf:focus {
border-color: var(--accent, var(--red));
outline: none;