Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 2 additions & 17 deletions apps/portal/src/pages/ModelList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,6 @@ export function ModelList() {
queryKey: ["models"],
queryFn: () => api.listModels(),
});
const { data: agents = [] } = useQuery({
queryKey: ["agents", "include-deleted"],
queryFn: () => api.listAgents({ includeDeleted: true }),
staleTime: 60_000,
});
const agentById = useMemo(
() => new Map(agents.map((agent) => [agent._id, agent])),
[agents],
);

const providerOptions = useMemo(() => {
const map = new Map<string, number>();
Expand All @@ -53,16 +44,10 @@ export function ModelList() {
.sort(([a], [b]) => a.localeCompare(b))
.map(([value, count]) => ({
value,
label: (
<AgentBadge
agentId={value}
agent={agentById.get(value)}
triggerLink={false}
/>
),
label: value,
count,
}));
}, [models, agentById]);
}, [models]);

const agentOptions = useMemo(() => {
const map = new Map<string, number>();
Expand Down
Loading