🪞 fix: Match Prompt Cache TTL Control to Region Combobox Styling (#13839)
Some checks are pending
Docker Dev Branch Images Build / build (Dockerfile, lc-dev, node) (push) Waiting to run
Docker Dev Branch Images Build / build (Dockerfile.multi, lc-dev-api, api-build) (push) Waiting to run
GitNexus Index / index (push) Waiting to run
GitNexus Index / post-index (push) Blocked by required conditions

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 commit is contained in:
Danny Avila 2026-06-18 22:25:54 -04:00 committed by GitHub
parent 268fcbb78d
commit 2c6db6bf73
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -415,11 +415,11 @@ const anthropic: Record<string, SettingDefinition> = {
type: 'enum',
default: anthropicSettings.promptCacheTtl.default,
options: ['5m', '1h'],
component: 'dropdown',
component: 'combobox',
optionType: 'conversation',
showDefault: false,
placeholder: 'com_endpoint_prompt_cache_ttl_default',
placeholderCode: true,
selectPlaceholder: 'com_endpoint_prompt_cache_ttl_default',
selectPlaceholderCode: true,
columnSpan: 2,
},
thinking: {
@ -577,11 +577,11 @@ const bedrock: Record<string, SettingDefinition> = {
type: 'enum',
default: undefined,
options: ['5m', '1h'],
component: 'dropdown',
component: 'combobox',
optionType: 'conversation',
showDefault: false,
placeholder: 'com_endpoint_prompt_cache_ttl_default',
placeholderCode: true,
selectPlaceholder: 'com_endpoint_prompt_cache_ttl_default',
selectPlaceholderCode: true,
columnSpan: 2,
},
reasoning_effort: {