Skip to content

AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.

feat(copilot): clarify Max model access in picker (#14360)

Toran Bruce Richards977c47767ba4
diff --git a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/components/ConnectionPicker/ConnectAccountRow.tsx b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/components/ConnectionPicker/ConnectAccountRow.tsx
index f12139fd37..ce7d3ef2ec 100644
--- a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/components/ConnectionPicker/ConnectAccountRow.tsx
+++ b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/components/ConnectionPicker/ConnectAccountRow.tsx
@@ -1,10 +1,9 @@
"use client";
-import { PlusSignIcon } from "@hugeicons/core-free-icons";
+import { Loading03Icon, PlusSignIcon } from "@hugeicons/core-free-icons";
import { Button } from "@/components/atoms/Button/Button";
import { Icon } from "@/components/atoms/Icon/Icon";
-import { LoadingSpinner } from "@/components/atoms/LoadingSpinner/LoadingSpinner";
import { IntegrationLogo } from "@/components/molecules/IntegrationLogo/IntegrationLogo";
interface Props {
@@ -21,30 +20,34 @@ interface Props {
*/
export function ConnectAccountRow({ onConnect, isConnecting }: Props) {
return (
- <div className="flex items-center gap-3 px-3 py-2">
+ <Button
+ type="button"
+ variant="ghost"
+ size="small"
+ aria-label="Connect a ChatGPT subscription"
+ disabled={isConnecting}
+ onClick={onConnect}
+ className="h-auto min-h-14 w-full justify-start gap-3 whitespace-normal rounded-lg px-3 py-2 text-left"
+ >
<IntegrationLogo provider="openai" size={20} />
- {/* The row sits under "Add a connection" and beside the connections it
- would join, so what it is for is already said. A sentence of its own
- would only repeat the section above it. */}
- <span className="min-w-0 flex-1 truncate text-sm font-medium text-zinc-900">
- ChatGPT subscription
+ <span className="min-w-0 flex-1 text-sm font-medium text-zinc-900">
+ <span className="block">ChatGPT subscription</span>
+ <span className="mt-1 block text-[11px] font-normal text-zinc-600">
+ Connect your existing account
+ </span>
</span>
- <Button
- variant="primary"
- size="small"
- aria-label="Connect a ChatGPT subscription"
- // Not the Button's own `loading`: it keeps the children beside its
- // spinner, and drops the props that carry this button's only name.
- disabled={isConnecting}
- onClick={onConnect}
- className="h-8 w-8 min-w-0 flex-none p-0"
+ <span
+ role={isConnecting ? "status" : undefined}
+ aria-label={isConnecting ? "Connecting ChatGPT" : undefined}
+ className="flex size-7 flex-none items-center justify-center rounded-lg border border-zinc-200 bg-white text-zinc-500"
>
- {isConnecting ? (
- <LoadingSpinner size="small" />
- ) : (
- <Icon icon={PlusSignIcon} size={16} aria-hidden />
- )}
- </Button>
- </div>
+ <Icon
+ icon={isConnecting ? Loading03Icon : PlusSignIcon}
+ size={14}
+ aria-hidden
+ className={isConnecting ? "animate-spin" : undefined}
+ />
+ </span>
+ </Button>
);
}
diff --git a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/components/ConnectionPicker/ConnectionPicker.tsx b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/components/ConnectionPicker/ConnectionPicker.tsx
index c250919458..e022cb1c7d 100644
--- a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/components/ConnectionPicker/ConnectionPicker.tsx
+++ b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/components/ConnectionPicker/ConnectionPicker.tsx
@@ -27,6 +27,7 @@ import { cn } from "@/lib/utils";
import { ChoiceRow } from "./ChoiceRow";
import { ConnectAccountRow } from "./ConnectAccountRow";
+import { MaxUpgradeCard } from "./MaxUpgradeCard";
import { Swap } from "./Swap";
import {
isLinkedAccount,
@@ -80,6 +81,9 @@ export function ConnectionPicker({
isLoading,
isError,
} = useConnectionPicker();
+ const advancedLock = tierLock(active, "advanced");
+ const showMaxUpgrade =
+ active?.auth_method === "deployment" && Boolean(advancedLock);
if (isLoading && offers.length === 0) return null;
@@ -219,7 +223,10 @@ export function ConnectionPicker({
<PopoverContent
align="end"
- className="w-[24rem] max-w-[calc(100vw-2rem)] rounded-2xl border-zinc-200 bg-[#F9F9FA] p-3 pt-4 text-zinc-900 shadow-lg"
+ className={cn(
+ "max-h-[var(--radix-popover-content-available-height)] w-[24rem] max-w-[calc(100vw-2rem)] overflow-y-auto rounded-2xl border-zinc-200 bg-[#F9F9FA] p-3 pt-4 text-zinc-900 shadow-lg",
+ showMaxUpgrade && "bg-white",
+ )}
>
{showsConnections && (
<>
@@ -288,10 +295,26 @@ export function ConnectionPicker({
{showTiers && (
<>
<SectionLabel>Model tier</SectionLabel>
- <div className="overflow-hidden rounded-xl border border-neutral-200 bg-white">
+ <div
+ className={cn(
+ "overflow-hidden rounded-xl border border-neutral-200 bg-white",
+ showMaxUpgrade && "border-0",
+ )}
+ >
<TierToggle
value={tier}
onSelect={setTier}
+ advancedUpgrade={
+ showMaxUpgrade && advancedLock?.href ? (
+ <MaxUpgradeCard
+ label={tierLabel(active, "advanced")}
+ name={tierName(active, "advanced")}
+ model={tierModel(active, "advanced")}
+ reason={advancedLock.reason}
+ href={advancedLock.href}
+ />
+ ) : undefined
+ }
segments={TIERS.map((candidate) => ({
tier: candidate,
label: tierLabel(active, candidate),
@@ -305,13 +328,18 @@ export function ConnectionPicker({
)}
{canConnectChatGPT && (
- <>
+ <div
+ className={cn(
+ "mt-4",
+ showMaxUpgrade && "border-t border-zinc-200 pt-4",
+ )}
+ >
<SectionLabel>Add a connection</SectionLabel>
<ConnectAccountRow
onConnect={connectChatGPT}
isConnecting={isConnecting}
/>
- </>
+ </div>
)}
</PopoverContent>
</Popover>
diff --git a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/components/ConnectionPicker/MaxUpgradeCard.tsx b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/components/ConnectionPicker/MaxUpgradeCard.tsx
new file mode 100644
index 0000000000..5640c7c92e
--- /dev/null
+++ b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/components/ConnectionPicker/MaxUpgradeCard.tsx
@@ -0,0 +1,65 @@
+import {
+ AiBrain01Icon,
+ ArrowRight02Icon,
+ LockIcon,
+} from "@hugeicons/core-free-icons";
+
+import { Button } from "@/components/atoms/Button/Button";
+import { Icon } from "@/components/atoms/Icon/Icon";
+
+interface Props {
+ label: string;
+ name: string;
+ model?: string | null;
+ reason: string;
+ href: string;
+}
+
+export function MaxUpgradeCard({ label, name, model, reason, href }: Props) {
+ return (
+ <div className="mt-3 rounded-xl border border-purple-200/40 bg-purple-50 p-4">
+ <div
+ role="radio"
+ aria-checked={false}
+ aria-disabled="true"
+ aria-label={`${label} — ${reason}`}
+ tabIndex={-1}
+ className="flex items-start gap-3"
+ >
+ <span className="flex size-8 flex-none items-center justify-center rounded-lg border border-purple-200/60 bg-white text-purple-600">
+ <Icon icon={AiBrain01Icon} size={18} aria-hidden />
+ </span>
+ <span className="min-w-0 flex-1">
+ <span className="block text-sm font-medium text-zinc-900">
+ {name}
+ </span>
+ {model && (
+ <span className="mt-0.5 block break-words text-xs text-zinc-600">
+ {model}
+ </span>
+ )}
+ </span>
+ <span className="inline-flex items-center gap-1 rounded bg-white px-1.5 py-1 text-[10px] font-semibold tracking-wide text-purple-700">
+ <Icon icon={LockIcon} size={10} aria-hidden />
+ MAX
+ </span>
+ </div>
+ <p className="mb-2 mt-5 text-lg font-medium leading-snug tracking-tight text-zinc-900">
+ Unlock {name} with Max.
+ </p>
+ <p className="text-xs leading-relaxed text-zinc-600">{reason}</p>
+ <Button
+ as="NextLink"
+ href={href}
+ variant="primary"
+ size="small"
+ className="mt-5 h-11 w-full rounded-lg border-purple-600 bg-purple-600 text-white hover:border-purple-700 hover:bg-purple-700"
+ data-fast-goal="subscription_upgrade_intent"
+ data-fast-goal-surface="model_picker"
+ >
+ Upgrade to Max
+ <Icon icon={ArrowRight02Icon} size={16} aria-hidden />
+ </Button>
+ </div>
+ );
+}
diff --git a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/components/ConnectionPicker/TierToggle.tsx b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/components/ConnectionPicker/TierToggle.tsx
index 3bf116b8d7..4f480aef6f 100644
--- a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/components/ConnectionPicker/TierToggle.tsx
+++ b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/components/ConnectionPicker/TierToggle.tsx
@@ -7,6 +7,7 @@ import {
Tick02Icon,
} from "@hugeicons/core-free-icons";
import Link from "next/link";
+import { Fragment, type ReactNode } from "react";
import { Icon } from "@/components/atoms/Icon/Icon";
import { cn } from "@/lib/utils";
@@ -30,6 +31,7 @@ interface Props {
segments: Segment[];
value: CopilotLlmModel;
onSelect: (tier: CopilotLlmModel) => void;
+ advancedUpgrade?: ReactNode;
}
/**
@@ -44,13 +46,19 @@ function tierIcon(tier: CopilotLlmModel) {
return tier === "advanced" ? AiBrain01Icon : FlashIcon;
}
-export function TierToggle({ segments, value, onSelect }: Props) {
+export function TierToggle({
+ segments,
+ value,
+ onSelect,
+ advancedUpgrade,
+}: Props) {
const options = segments.map((segment) => ({
value: segment.tier,
disabled: Boolean(segment.lock),
}));
function handleKeyDown(event: React.KeyboardEvent<HTMLDivElement>) {
+ if (event.target instanceof Element && event.target.closest("a")) return;
const to = nextRovingValue(options, value, event.key);
if (to === null) return;
event.preventDefault();
@@ -67,11 +75,18 @@ export function TierToggle({ segments, value, onSelect }: Props) {
role="radiogroup"
aria-label="Model tier"
onKeyDown={handleKeyDown}
- className="divide-y divide-neutral-200"
+ className={cn(
+ "divide-y divide-neutral-200",
+ advancedUpgrade && "divide-y-0",
+ )}
>
{segments.map((segment) =>
segment.lock ? (
- <LockedSegment key={segment.tier} segment={segment} />
+ segment.tier === "advanced" && advancedUpgrade ? (
+ <Fragment key={segment.tier}>{advancedUpgrade}</Fragment>
+ ) : (
+ <LockedSegment key={segment.tier} segment={segment} />
+ )
) : (
<button
key={segment.tier}
diff --git a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/components/__tests__/ConnectAccountRow.test.tsx b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/components/__tests__/ConnectAccountRow.test.tsx
new file mode 100644
index 0000000000..3d64d897de
--- /dev/null
+++ b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/components/__tests__/ConnectAccountRow.test.tsx
@@ -0,0 +1,34 @@
+import { render, screen } from "@/tests/integrations/test-utils";
+import userEvent from "@testing-library/user-event";
+import { expect, it, vi } from "vitest";
+
+import { ConnectAccountRow } from "../ConnectionPicker/ConnectAccountRow";
+
+it("keeps the entire connection row actionable and prevents duplicate connections while pending", async () => {
+ const onConnect = vi.fn();
+ const view = render(
+ <ConnectAccountRow onConnect={onConnect} isConnecting={false} />,
+ );
+ await userEvent.click(screen.getByText("ChatGPT subscription"));
+ expect(onConnect).toHaveBeenCalledTimes(1);
+
+ view.rerender(<ConnectAccountRow onConnect={onConnect} isConnecting />);
+ const connect = screen.getByRole("button", {
+ name: "Connect a ChatGPT subscription",
+ });
+ expect(connect.hasAttribute("disabled")).toBe(true);
+ const status = screen.getByRole("status", { name: "Connecting ChatGPT" });
+ expect(status.querySelector("svg")?.classList.contains("animate-spin")).toBe(
+ true,
+ );
+ await userEvent.click(connect);
+ expect(onConnect).toHaveBeenCalledTimes(1);
+
+ view.rerender(
+ <ConnectAccountRow onConnect={onConnect} isConnecting={false} />,
+ );
+ expect(connect.hasAttribute("disabled")).toBe(false);
+ expect(
+ screen.queryByRole("status", { name: "Connecting ChatGPT" }),
+ ).toBeNull();
+});
diff --git a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/components/__tests__/MaxUpgrade.test.tsx b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/components/__tests__/MaxUpgrade.test.tsx
new file mode 100644
index 0000000000..2f9dc77d8b
--- /dev/null
+++ b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/components/__tests__/MaxUpgrade.test.tsx
@@ -0,0 +1,151 @@
+import { server } from "@/mocks/mock-server";
+import { render, screen, within } from "@/tests/integrations/test-utils";
+import userEvent from "@testing-library/user-event";
+import { http, HttpResponse } from "msw";
+import { beforeEach, describe, expect, it, vi } from "vitest";
+import { useCopilotUIStore } from "../../../../store";
+import { ConnectionPicker } from "../ConnectionPicker/ConnectionPicker";
+import {
+ mockMaxUpgrade,
+ deploymentOffer,
+ openPicker,
+} from "./maxUpgradeFixtures";
+
+beforeEach(() => {
+ useCopilotUIStore.setState({
+ copilotLlmAuth: null,
+ copilotLlmModel: "standard",
+ });
+});
+
+describe("contextual Max upsell", () => {
+ it("links the locked server model to existing billing without fetching or showing prices", async () => {
+ const billingRequest = vi.fn(() => HttpResponse.error());
+ mockMaxUpgrade();
+ server.use(http.all("*/api/credits/*", billingRequest));
+ render(<ConnectionPicker />);
+ await openPicker();
+
+ const upgrade = await screen.findByRole("link", { name: "Upgrade to Max" });
+ expect(upgrade.getAttribute("href")).toBe("/settings/billing");
+ expect(screen.getByText("opus-server").isConnected).toBe(true);
+ const group = screen.getByRole("radiogroup", { name: "Model tier" });
+ const advanced = within(group).getByRole("radio", {
+ name: /Advanced.*opus-server/,
+ });
+ expect(advanced.getAttribute("aria-disabled")).toBe("true");
+ expect(advanced.getAttribute("aria-checked")).toBe("false");
+ expect(advanced.getAttribute("tabindex")).toBe("-1");
+ expect(
+ within(group)
+ .getByRole("radio", { name: /Balanced.*sonnet-server/ })
+ .getAttribute("aria-checked"),
+ ).toBe("true");
+ expect(
+ screen.queryByText(
+ /\$\d|prorat|higher usage|priority support|file storage/i,
+ ),
+ ).toBeNull();
+ expect(
+ screen.queryByRole("button", { name: /Review upgrade|Upgrade to Max/ }),
+ ).toBeNull();
+ expect(billingRequest).not.toHaveBeenCalled();
+ expect(useCopilotUIStore.getState().copilotLlmModel).toBe("standard");
+ });
+
+ it("preserves the ChatGPT connection entry below the Max offer", async () => {
+ mockMaxUpgrade();
+ render(<ConnectionPicker />);
+ await openPicker();
+
+ const upgrade = await screen.findByRole("link", { name: "Upgrade to Max" });
+ expect(screen.getByText("Add a connection").isConnected).toBe(true);
+ const connect = screen.getByRole("button", {
+ name: "Connect a ChatGPT subscription",
+ });
+ expect(within(connect).getByText("ChatGPT subscription").isConnected).toBe(
+ true,
+ );
+ expect(connect.hasAttribute("disabled")).toBe(false);
+ expect(
+ upgrade.compareDocumentPosition(connect) &
+ Node.DOCUMENT_POSITION_FOLLOWING,
+ ).toBeTruthy();
+ });
+
+ it("retains the ChatGPT plan gate alongside the Advanced upsell", async () => {
+ mockMaxUpgrade([
+ deploymentOffer(),
+ deploymentOffer({
+ offer_id: "codex:locked",
+ provider_family: "openai",
+ display_name: "ChatGPT",
+ auth_method: "chatgpt_oauth",
+ state: "locked",
+ selectable: false,
+ is_default: false,
+ tiers: [],
+ lock_reason: "A Max plan or higher is required to use ChatGPT.",
+ unlock_href: "/settings/billing",
+ }),
+ ]);
+ render(<ConnectionPicker />);
+ await openPicker();
+
+ expect(
+ (
+ await screen.findByRole("link", { name: "Upgrade to Max" })
+ ).getAttribute("href"),
+ ).toBe("/settings/billing");
+ expect(
+ screen.getByText("A Max plan or higher is required to use ChatGPT.")
+ .isConnected,
+ ).toBe(true);
+ expect(
+ screen.getByRole("link", { name: "See plans" }).getAttribute("href"),
+ ).toBe("/settings/billing");
+ expect(
+ screen.queryByRole("button", { name: "Connect a ChatGPT subscription" }),
+ ).toBeNull();
+ });
+
+ it("keeps a connected provider's available Advanced tier selectable", async () => {
+ const linked = deploymentOffer({
+ offer_id: "codex:cred-1",
+ provider_family: "openai",
+ display_name: "ChatGPT",
+ auth_method: "chatgpt_oauth",
+ credential_id: "cred-1",
+ backed_by_label: "Your ChatGPT plan",
+ is_default: false,
+ tiers: [
+ {
+ tier: "standard",
+ label: "Balanced",
+ selectable: true,
+ display_model: null,
+ },
+ {
+ tier: "advanced",
+ label: "Advanced",
+ selectable: true,
+ display_model: null,
+ },
+ ],
+ });
+ mockMaxUpgrade([deploymentOffer(), linked]);
+ render(<ConnectionPicker />);
+ await openPicker();
+ await userEvent.click(
+ await screen.findByRole("radio", { name: /ChatGPT/ }),
+ );
+ await userEvent.click(screen.getByRole("radio", { name: "Advanced" }));
+
+ expect(useCopilotUIStore.getState().copilotLlmModel).toBe("advanced");
+ expect(screen.queryByRole("link", { name: "Upgrade to Max" })).toBeNull();
+ expect(useCopilotUIStore.getState().copilotLlmAuth).toEqual({
+ authProvider: "codex",
+ credentialId: "cred-1",
+ });
+ });
+});
diff --git a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/components/__tests__/TierToggle.test.tsx b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/components/__tests__/TierToggle.test.tsx
index c6e5c764a6..4361f28729 100644
--- a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/components/__tests__/TierToggle.test.tsx
+++ b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/components/__tests__/TierToggle.test.tsx
@@ -1,7 +1,9 @@
import { render, screen, within } from "@/tests/integrations/test-utils";
+import userEvent from "@testing-library/user-event";
import { expect, it, vi } from "vitest";
import { TierToggle } from "../ConnectionPicker/TierToggle";
+import { MaxUpgradeCard } from "../ConnectionPicker/MaxUpgradeCard";
it("exposes a locked tier as a disabled member of the radio group", () => {
render(
@@ -34,3 +36,52 @@ it("exposes a locked tier as a disabled member of the radio group", () => {
expect(locked.getAttribute("aria-checked")).toBe("false");
expect(locked.getAttribute("tabindex")).toBe("-1");
});
+
+it("does not intercept navigation keys on an upgrade link or select the locked tier", async () => {
+ const onSelect = vi.fn();
+ render(
+ <TierToggle
+ segments={[
+ { tier: "standard", label: "Balanced" },
+ {
+ tier: "advanced",
+ label: "Advanced",
+ lock: { reason: "Max required", href: "/settings/billing" },
+ },
+ ]}
+ value="standard"
+ onSelect={onSelect}
+ advancedUpgrade={
+ <MaxUpgradeCard
+ label="Advanced"
+ name="Advanced"
+ reason="Max required"
+ href="/settings/billing"
+ />
+ }
+ />,
+ );
+
+ const balanced = screen.getByRole("radio", { name: "Balanced" });
+ balanced.focus();
+ await userEvent.keyboard("{ArrowDown}");
+ expect(document.activeElement).toBe(balanced);
+ expect(onSelect).not.toHaveBeenCalledWith("advanced");
+ onSelect.mockClear();
+
+ await userEvent.tab();
+ const upgrade = screen.getByRole("link", { name: "Upgrade to Max" });
+ expect(document.activeElement).toBe(upgrade);
+ for (const key of [
+ "ArrowDown",
+ "ArrowUp",
+ "ArrowLeft",
+ "ArrowRight",
+ "Home",
+ "End",
+ ]) {
+ await userEvent.keyboard(`{${key}}`);
+ expect(document.activeElement).toBe(upgrade);
+ }
+ expect(onSelect).not.toHaveBeenCalled();
+});
diff --git a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/components/__tests__/maxUpgradeFixtures.tsx b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/components/__tests__/maxUpgradeFixtures.tsx
new file mode 100644
index 0000000000..22d85b4a81
--- /dev/null
+++ b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/components/__tests__/maxUpgradeFixtures.tsx
@@ -0,0 +1,48 @@
+import { getGetV2ListChatConnectionsMockHandler200 } from "@/app/api/__generated__/endpoints/chat/chat.msw";
+import type { AIConnectionOffer } from "@/app/api/__generated__/models/aIConnectionOffer";
+import { server } from "@/mocks/mock-server";
+import { screen } from "@/tests/integrations/test-utils";
+import userEvent from "@testing-library/user-event";
+export async function openPicker() {
+ await userEvent.click(
+ await screen.findByRole("button", { name: /— change/ }),
+ );
+}
+
+export function deploymentOffer(
+ overrides: Partial<AIConnectionOffer> = {},
+): AIConnectionOffer {
+ return {
+ offer_id: "platform:deployment",
+ provider_family: "autogpt",
+ display_name: "AutoGPT Platform",
+ auth_method: "deployment",
+ credential_id: null,
+ backed_by_label: "Your AutoGPT plan",
+ description: "New chats are backed by your AutoGPT plan.",
+ state: "ready",
+ selectable: true,
+ is_default: true,
+ tiers: [
+ {
+ tier: "standard",
+ label: "Balanced",
+ selectable: true,
+ display_model: "sonnet-server",
+ },
+ {
+ tier: "advanced",
+ label: "Advanced",
+ selectable: false,
+ display_model: "opus-server",
+ lock_reason: "A Max plan or higher is required for Advanced.",
+ },
+ ],
+ limitations: [],
+ ...overrides,
+ };
+}
+
+export function mockMaxUpgrade(offers = [deploymentOffer()]) {
+ server.use(getGetV2ListChatConnectionsMockHandler200({ offers }));
+}