🪞 fix: Match Prompt Cache TTL Control to Region Combobox Styling - #13839
Merged
Merged
Conversation
The Prompt Cache Duration control used `component: 'dropdown'` (DynamicDropdown → SelectDropDown), which renders with a different trigger style than the sibling Region selector and expands its options inline (headless-ui Listbox) — causing a visual mismatch and layout shift in the parameters panel. Switch both the Anthropic and Bedrock promptCacheTtl definitions to `component: 'combobox'` (DynamicCombobox → ControlCombobox), the same component Region uses: matching rounded trigger styling, an Ariakit popover (portal, no layout shift), and — as a bonus — it persists selections via setOption on custom endpoints (DynamicDropdown's custom branch is a no-op TODO). Renames the placeholder fields to the combobox's selectPlaceholder/selectPlaceholderCode.
fuuuzzy
pushed a commit
to fuuuzzy/LibreChat
that referenced
this pull request
Jul 7, 2026
…reChat-AI#13839) The Prompt Cache Duration control used `component: 'dropdown'` (DynamicDropdown → SelectDropDown), which renders with a different trigger style than the sibling Region selector and expands its options inline (headless-ui Listbox) — causing a visual mismatch and layout shift in the parameters panel. Switch both the Anthropic and Bedrock promptCacheTtl definitions to `component: 'combobox'` (DynamicCombobox → ControlCombobox), the same component Region uses: matching rounded trigger styling, an Ariakit popover (portal, no layout shift), and — as a bonus — it persists selections via setOption on custom endpoints (DynamicDropdown's custom branch is a no-op TODO). Renames the placeholder fields to the combobox's selectPlaceholder/selectPlaceholderCode.
ThomasVuNguyen
pushed a commit
to ThomasVuNguyen/LibreChat
that referenced
this pull request
Jul 15, 2026
…reChat-AI#13839) The Prompt Cache Duration control used `component: 'dropdown'` (DynamicDropdown → SelectDropDown), which renders with a different trigger style than the sibling Region selector and expands its options inline (headless-ui Listbox) — causing a visual mismatch and layout shift in the parameters panel. Switch both the Anthropic and Bedrock promptCacheTtl definitions to `component: 'combobox'` (DynamicCombobox → ControlCombobox), the same component Region uses: matching rounded trigger styling, an Ariakit popover (portal, no layout shift), and — as a bonus — it persists selections via setOption on custom endpoints (DynamicDropdown's custom branch is a no-op TODO). Renames the placeholder fields to the combobox's selectPlaceholder/selectPlaceholderCode.
LogicalAbsurd
pushed a commit
to LogicalAbsurd/LibreChat
that referenced
this pull request
Aug 27, 2026
…reChat-AI#13839) The Prompt Cache Duration control used `component: 'dropdown'` (DynamicDropdown → SelectDropDown), which renders with a different trigger style than the sibling Region selector and expands its options inline (headless-ui Listbox) — causing a visual mismatch and layout shift in the parameters panel. Switch both the Anthropic and Bedrock promptCacheTtl definitions to `component: 'combobox'` (DynamicCombobox → ControlCombobox), the same component Region uses: matching rounded trigger styling, an Ariakit popover (portal, no layout shift), and — as a bonus — it persists selections via setOption on custom endpoints (DynamicDropdown's custom branch is a no-op TODO). Renames the placeholder fields to the combobox's selectPlaceholder/selectPlaceholderCode.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to #13835. The Prompt Cache Duration control rendered with a different style than the rest of the parameters panel and shifted layout when opened.
Root cause: it used
component: 'dropdown'→DynamicDropdown→SelectDropDown(headless-uiListbox), whereas the sibling Region selector usescomponent: 'combobox'→DynamicCombobox→ControlCombobox(Ariakit). The two render differently:dropdown(before)combobox(after, = Region)surface-secondaryListbox+Transition→ layout shiftAriakit.SelectPopoverwithportal→ no shift// TODOno-op (doesn'tsetOption)setOptionChange
Switch both the Anthropic and Bedrock
promptCacheTtldefinitions fromdropdowntocomboboxand renameplaceholder/placeholderCode→selectPlaceholder/selectPlaceholderCode. Data-only change — the genericcomponentMappingalready routescomboboxtoDynamicCombobox.Bonus: because
DynamicComboboxcallssetOptionunconditionally (unlikeDynamicDropdown's custom branch), this also fixes the custom-endpoint persistence gap raised in the #13835 Codex review.Notes
ControlComboboxalways renders a search box, which is heavier than needed for two options (5m/1h) but matches Region's behavior. Happy to add an optionalshowSearchprop to suppress it for short lists as a separate change if preferred.default: undefinedis preserved, so the SDK's 1h default still applies until the user picks a value.Testing
data-providerbuild + parameterSettings/schemas specs (122) pass; lint clean.