Skip to content

Enhanced ChatGPT Clone: Features Agents, MCP, Skills, DeepSeek, Anthropic, AWS, OpenAI, Responses API, Azure, Groq, o1, GPT-5, Mistral, OpenRouter, Vertex AI, Gemini, Artifacts, AI model switching, message search, Code Interpreter, langchain, DALL-E-3, OpenAPI Actions, Functions, Secure Multi-User Auth, Presets, open-source for self-hosting. Active

📐 fix: Size the Model Picker to Its Content (#14859)

Marco Beretta73812adca151
diff --git a/client/src/components/Chat/Menus/Endpoints/ModelSelector.tsx b/client/src/components/Chat/Menus/Endpoints/ModelSelector.tsx
index 0d2dbeeb6f..b72c4f2dcc 100644
--- a/client/src/components/Chat/Menus/Endpoints/ModelSelector.tsx
+++ b/client/src/components/Chat/Menus/Endpoints/ModelSelector.tsx
@@ -72,7 +72,7 @@ function ModelSelectorContent() {
<button
data-testid="model-selector-button"
aria-keyshortcuts={modelSelectorAriaKey}
- className="my-1 flex h-9 w-full max-w-[70vw] items-center justify-center gap-2 rounded-xl border border-border-light bg-presentation px-3 py-2 text-sm text-text-primary hover:bg-surface-active-alt"
+ className="my-1 flex h-9 max-w-full items-center gap-2 rounded-xl border border-border-light bg-presentation px-3 py-2 text-sm text-text-primary hover:bg-surface-active-alt"
aria-label={localize('com_ui_select_model')}
>
{selectedIcon && React.isValidElement(selectedIcon) && (
@@ -80,14 +80,14 @@ function ModelSelectorContent() {
{selectedIcon}
</div>
)}
- <span className="flex-grow truncate text-left">{selectedDisplayValue}</span>
+ <span className="truncate text-left">{selectedDisplayValue}</span>
</button>
}
/>
);
return (
- <div className="relative flex w-full max-w-md flex-col items-center gap-2">
+ <div className="relative flex min-w-0 max-w-[60vw] flex-col items-center gap-2 sm:max-w-xs">
<Menu
values={selectedValues}
onValuesChange={(values: Record<string, any>) => {