The best way to control Claude Code, Codex and more from any computer or phone
perf(web): the custom model editor compiles without manual memoization (#20586)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Julius Marminge committed
Oct 16, 2026 at 22:04 UTC
54bffb912e82b514deef44769cb68f84758538ba
1 file changed
+4
-8
apps/web/src/components/settings/CustomModelEditor.tsx
+4
-8
@@ -1,7 +1,7 @@
1
"use client";
2
3
import { PlusIcon, XIcon } from "lucide-react";
4
-import { useMemo, useState } from "react";
4
+import { useState } from "react";
5
import type { ProviderDriverKind, ServerProviderModel } from "@t3tools/contracts";
6
import type { CustomModelDefinition } from "@t3tools/shared/model";
7
@@ -47,13 +47,9 @@ export function CustomModelEditor({
47
}: CustomModelEditorProps) {
48
const [draft, setDraft] = useState<CustomModelDraft>(() => draftFromDefinition(entry));
49
const [error, setError] = useState<string | null>(null);
50
- const presets = useMemo(
51
- () => (driverKind ? (DESCRIPTOR_PRESETS_BY_KIND[driverKind] ?? []) : []),
52
- [driverKind],
53
- );
54
- const startFromCandidates = useMemo(
55
- () => builtInModels.filter((model) => (model.capabilities?.optionDescriptors?.length ?? 0) > 0),
56
- [builtInModels],
50
+ const presets = driverKind ? (DESCRIPTOR_PRESETS_BY_KIND[driverKind] ?? []) : [];
51
+ const startFromCandidates = builtInModels.filter(
52
+ (model) => (model.capabilities?.optionDescriptors?.length ?? 0) > 0,
53
);
54
const domId = (suffix: string) => `provider-instance-${instanceId}-custom-model-${suffix}`;
55