MCPcopy Create free account
hub / github.com/Openpanel-dev/openpanel / isValidModelId

Function isValidModelId

packages/validation/src/chat.ts:167–169  ·  view source on GitHub ↗
(id: string | null | undefined)

Source from the content-addressed store, hash-verified

165export const PREFERRED_DEFAULT_MODEL_ID = 'gpt-4-1-mini';
166
167export function isValidModelId(id: string | null | undefined): id is ChatModelId {
168 return !!id && CHAT_MODELS.some((m) => m.id === id);
169}
170
171export function getModelLabel(id: string): string {
172 return CHAT_MODELS.find((m) => m.id === id)?.label ?? id;

Callers 1

readStoredAgentFunction · 0.85

Calls 1

someMethod · 0.45

Tested by

no test coverage detected