diff --git a/frontend/src/routes/llm-settings.tsx b/frontend/src/routes/llm-settings.tsx index ca5163f3dd..d78df48cd9 100644 --- a/frontend/src/routes/llm-settings.tsx +++ b/frontend/src/routes/llm-settings.tsx @@ -28,6 +28,7 @@ import { KeyStatusIcon } from "#/components/features/settings/key-status-icon"; import { DEFAULT_SETTINGS } from "#/services/settings"; import { getProviderId } from "#/utils/map-provider"; import { DEFAULT_OPENHANDS_MODEL } from "#/utils/verified-models"; +import { USE_V1_CONVERSATION_API } from "#/utils/feature-flags"; interface OpenHandsApiKeyHelpProps { testId: string; @@ -118,6 +119,9 @@ function LlmSettingsScreen() { const isSaasMode = config?.APP_MODE === "saas"; const shouldUseOpenHandsKey = isOpenHandsProvider && isSaasMode; + // Determine if we should hide the agent dropdown when V1 conversation API feature flag is enabled + const isV1Enabled = USE_V1_CONVERSATION_API(); + React.useEffect(() => { const determineWhetherToToggleAdvancedSettings = () => { if (resources && settings) { @@ -612,21 +616,23 @@ function LlmSettingsScreen() { href="https://tavily.com/" /> - ({ - key: agent, - label: agent, // TODO: Add i18n support for agent names - })) || [] - } - defaultSelectedKey={settings.AGENT} - isClearable={false} - onInputChange={handleAgentIsDirty} - wrapperClassName="w-full max-w-[680px]" - /> + {!isV1Enabled && ( + ({ + key: agent, + label: agent, // TODO: Add i18n support for agent names + })) || [] + } + defaultSelectedKey={settings.AGENT} + isClearable={false} + onInputChange={handleAgentIsDirty} + wrapperClassName="w-full max-w-[680px]" + /> + )} )}