diff --git a/ui/src/components/ai-connections/AiConnectionCredentialStep.tsx b/ui/src/components/ai-connections/AiConnectionCredentialStep.tsx index bd7c492dfd0..c1ad3fc8f6e 100644 --- a/ui/src/components/ai-connections/AiConnectionCredentialStep.tsx +++ b/ui/src/components/ai-connections/AiConnectionCredentialStep.tsx @@ -2,6 +2,8 @@ import { AI_CONNECTION_CAPABILITIES, adapterLoginCommandKey, pluginLoginChoices, import { useMemo, useState, type ReactNode } from "react"; import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query"; import { type AiProvider, type AiAuthMethod, type AiConnectionLoginIntent } from "@paperclipai/shared"; +import { AccountProviderTiles } from "../onboarding/ModelSourceTiles"; +import { AppLogo } from "@/pages/apps/AppLogo"; import { AgentProviderConnection } from "@/components/new-agent/AgentProviderConnection"; import { ProviderApiKeyCard } from "@/components/AdapterLoginChrome"; import { Button } from "@/components/ui/button"; @@ -140,7 +142,7 @@ function SubscriptionConnectionStep({ defaultAccountDialog, providerDialog, onOt ; } -function ApiKeyConnectionStep({ providerDialog, advancedProviders, companyId, provider, connectionId, name: initialName, hideName, nameForMethod, ownership, agentIds, allAgents, environmentId: suppliedEnvironmentId, defaults, disabled, onComplete, onCancel }: Props) { +function ApiKeyConnectionStep({ providerDialog, onOtherModels, advancedProviders, companyId, provider, connectionId, name: initialName, hideName, nameForMethod, ownership, agentIds, allAgents, environmentId: suppliedEnvironmentId, defaults, disabled, onComplete, onCancel }: Props) { const [name, setName] = useState(initialName); const [apiKey, setApiKey] = useState(""); const client = useQueryClient(); @@ -157,6 +159,7 @@ function ApiKeyConnectionStep({ providerDialog, advancedProviders, companyId, pr onSettled: () => setApiKey(""), }); return
+ {onOtherModels && }} mode="api" onOtherModels={onOtherModels} />} {!hideName && } {save.error &&

{describeError(save.error).body}

} {copilot &&

Use a personal fine-grained token with Copilot Requests permission. GitHub token instructions. Verification discovers models in the selected environment and sends no model prompt. Repository access uses a separate connection.

} @@ -168,6 +171,6 @@ function ApiKeyConnectionStep({ providerDialog, advancedProviders, companyId, pr { if (!preparing && !environmentError && name.trim() && apiKey.trim()) save.mutate(); }} disabled={disabled || save.isPending || preparing || Boolean(environmentError)} placeholder={copilot ? "github_pat_..." : "Enter API key here"} autoFocus /> {defaults} {advancedProviders} -
+
{!onOtherModels && }
; } diff --git a/ui/src/components/ai-connections/AiConnectionField.tsx b/ui/src/components/ai-connections/AiConnectionField.tsx index e2c247162e2..26fd2b22276 100644 --- a/ui/src/components/ai-connections/AiConnectionField.tsx +++ b/ui/src/components/ai-connections/AiConnectionField.tsx @@ -294,15 +294,11 @@ export function AiConnectionField({ : showSetup(true)} + onOtherModels={() => { setReconnecting(undefined); showSetup(true); }} defaults={!reconnecting && } - advancedProviders={!reconnecting && provider !== "anthropic" && provider !== "openai" &&
- Advanced providers - -
} companyId={companyId} provider={provider} initialMethod={reconnecting?.method ?? method} diff --git a/ui/src/components/ai-connections/AiProviderSetup.tsx b/ui/src/components/ai-connections/AiProviderSetup.tsx index 21a995a4467..64230d84787 100644 --- a/ui/src/components/ai-connections/AiProviderSetup.tsx +++ b/ui/src/components/ai-connections/AiProviderSetup.tsx @@ -16,6 +16,7 @@ import { describeError } from "@/api/errors"; import { QueryErrorState, useQueryView } from "@/components/QueryView"; import { ConnectionChoiceList } from "@/features/connections/ConnectionChoiceList"; import { ConnectionAccessDefaults, connectionDefaultSummarySentence } from "@/features/connections/ConnectionSetupFlow"; +import { AccountProviderTiles } from "../onboarding/ModelSourceTiles"; import { PluginTile } from "@/pages/apps/PluginMarketplace"; import { AppLogo } from "@/pages/apps/AppLogo"; import { Button } from "@/components/ui/button"; @@ -320,6 +321,7 @@ export function AiProviderSetup({ ) : !advanced ? ( + {providerGrid && provider && : provider === "local" ? : }} mode={provider === "gateway" || provider === "local" ? "advanced" : "api"} onOtherModels={cancel} />} {(provider === "gateway" || provider === "local") && ( <>