From dd1cb0e5ba427ee2dba8df59874dc87df11e2bd2 Mon Sep 17 00:00:00 2001 From: Marco Beretta <81851188+berry-13@users.noreply.github.com> Date: Wed, 30 Sep 2026 09:28:18 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=9A=EF=B8=8F=20feat:=20Group=20Model?= =?UTF-8?q?=20Parameters=20Into=20Sections=20(#16247)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: Group the model parameters and drop the ones that cannot act The panel rendered a provider's parameter list in the order the definitions happen to arrive in, so it asked about temperature, then reasoning, then whether to resend files, with nothing to say which belonged together. The keys are filed under six headings now, with a count beside each of what this conversation has changed inside it, which is what the owner scans for before reaching for Reset. A key this map has never heard of, which is what a deployment's own customParams look like, keeps its place in the last section instead of being guessed at or dropped. Every parameter stays on screen. A settings panel is read as much as it is edited, and a disclosure trades seeing the current state at a glance for vertical space that costs nothing to find elsewhere: the headings are captions rather than buttons, a control is measured against the row it sits in rather than padded to a fixed block, and only free text takes the full width. A number, a toggle or a choice says the same thing in half of a 300px panel, so two sit side by side and the narrow ones in a section come first, leaving one ragged edge at the bottom instead of a gap beside every full-width field. Reset and Save As Preset share the closing row. Fifteen parameters occupy 954px where the same fifteen took 1243px with four of the six sections shut. Grouping alone would still show controls that do nothing. A definition can now declare what it rides along with: OpenAI's reasoning summary, mode and context travel inside the reasoning object the Responses API takes and are dropped by the server without it; a thinking budget is read only while thinking is enabled; a cache lifetime only while the cache is being written. Those five declare it, the panel judges each one on the companion's effective value, and a section left with nothing live disappears rather than standing empty. The rule lives on the definition rather than in the panel so a deployment defining its own parameters can state one too. The custom instructions field caps its own rows. It is sized by a shadow copy of itself, measured as the panel mounts and before the sidebar has settled on a width, and that measurement can come back as one word per line; a CSS max-height was hiding the wrong answer rather than correcting it. No parameter changes what it sends. This drops controls for values the server was already discarding. * refactor: Keep every model parameter on screen and drop only empty controls Hiding a parameter behind a companion toggle judged it by a rule the client cannot see all of: a reasoningObject endpoint sends the reasoning fields without the Responses API, adaptive-thinking Claude models ignore the budget however thinking is set, and a deployment could not declare the rule in librechat.yaml at all. The panel groups every parameter again and leaves out only a choice with no options, such as Bedrock's region when no regions are configured, so no section stands empty. Reset and Save As Preset share a row while their labels fit and stack when a translation is too long for the panel. * test(e2e): Scenarios for the grouped model parameters panel * fix(client): Wrap a parameter action label longer than the panel A Spanish Save As Preset label measures 338px on its own against a 282px row, so stacking the two actions still ran it past the panel. The labels now wrap inside their buttons. * fix(client): Scope stretched controls to the panel and say what its counts mean The shared parameter controls stretched to their parent's height, which the preset editors' tall columns turned into labels far above their fields; the panel's cells now stretch their controls instead. The change count beside a heading is read out as a number of changed settings, and clearing a default a deployment configured counts as a change. * test(e2e): Scenario for the preset dialog's label spacing (cherry picked from commit a78fb3a3a41082130c362a17e010a7451f3977c4) Original-PR: https://github.com/LibreChat-AI/LibreChat/pull/16247 --- .../SidePanel/Parameters/DynamicCheckbox.tsx | 2 +- .../SidePanel/Parameters/DynamicCombobox.tsx | 4 +- .../SidePanel/Parameters/DynamicDropdown.tsx | 4 +- .../SidePanel/Parameters/DynamicInput.tsx | 6 +- .../SidePanel/Parameters/DynamicSlider.tsx | 10 +- .../SidePanel/Parameters/DynamicSwitch.tsx | 6 +- .../SidePanel/Parameters/DynamicTags.tsx | 8 +- .../SidePanel/Parameters/DynamicTextarea.tsx | 10 +- .../SidePanel/Parameters/OptionHover.tsx | 2 +- .../components/SidePanel/Parameters/Panel.tsx | 133 +++++++++--- .../Parameters/__tests__/groups.spec.ts | 203 ++++++++++++++++++ .../components/SidePanel/Parameters/groups.ts | 197 +++++++++++++++++ client/src/locales/en/translation.json | 6 + .../scenarios/grouped-model-params.spec.ts | 167 ++++++++++++++ 14 files changed, 701 insertions(+), 57 deletions(-) create mode 100644 client/src/components/SidePanel/Parameters/__tests__/groups.spec.ts create mode 100644 client/src/components/SidePanel/Parameters/groups.ts create mode 100644 e2e/specs/mock/scenarios/grouped-model-params.spec.ts diff --git a/client/src/components/SidePanel/Parameters/DynamicCheckbox.tsx b/client/src/components/SidePanel/Parameters/DynamicCheckbox.tsx index 4e04dec854..4af94f8e16 100644 --- a/client/src/components/SidePanel/Parameters/DynamicCheckbox.tsx +++ b/client/src/components/SidePanel/Parameters/DynamicCheckbox.tsx @@ -64,7 +64,7 @@ function DynamicCheckbox({ > {labelCode ? (localize(label as TranslationKeys) ?? label) : label || settingKey}{' '} {showDefault && ( - + ({localize('com_endpoint_default')}:{' '} {defaultValue != null ? localize('com_ui_yes') : localize('com_ui_no')}) diff --git a/client/src/components/SidePanel/Parameters/DynamicCombobox.tsx b/client/src/components/SidePanel/Parameters/DynamicCombobox.tsx index f708b44d18..80d3d1833a 100644 --- a/client/src/components/SidePanel/Parameters/DynamicCombobox.tsx +++ b/client/src/components/SidePanel/Parameters/DynamicCombobox.tsx @@ -77,7 +77,7 @@ function DynamicCombobox({ )} > - + {showLabel === true && (