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

Function resolveModel

packages/ai/src/providers.ts:82–91  ·  view source on GitHub ↗
(entry: ChatModelEntry)

Source from the content-addressed store, hash-verified

80export const anthropicProvider = anthropic;
81
82export function resolveModel(entry: ChatModelEntry) {
83 switch (entry.group) {
84 case 'OpenAI':
85 // biome-ignore lint/suspicious/noExplicitAny: OpenAI model id union is open
86 return openai().model(entry.modelId as any);
87 case 'Anthropic':
88 // biome-ignore lint/suspicious/noExplicitAny: Anthropic model id union is open
89 return anthropic().model(entry.modelId as any);
90 }
91}

Callers 5

explainModelFunction · 0.90
enrichModelFunction · 0.90
narrativeModelFunction · 0.90
getAppFunction · 0.90
createChatAgentFunction · 0.90

Calls 2

openaiFunction · 0.85
anthropicFunction · 0.85

Tested by

no test coverage detected