MCPcopy Create free account
hub / github.com/altic-dev/Pilot / getModel

Function getModel

src/lib/model-provider.ts:47–63  ·  view source on GitHub ↗
(provider: ModelProvider)

Source from the content-addressed store, hash-verified

45 * Get the appropriate model instance based on provider selection
46 */
47export function getModel(provider: ModelProvider) {
48 logger.info("Getting model provider", { provider });
49
50 switch (provider) {
51 case "sonnet":
52 return anthropic("claude-sonnet-4-5");
53 case "haiku":
54 return anthropic("claude-haiku-4-5");
55 case "lmstudio":
56 return lmstudioProvider("openai/gpt-oss-20b");
57 case "groq":
58 return groqProvider;
59 default:
60 logger.warn("Unknown provider, defaulting to Sonnet", { provider });
61 return anthropic("claude-sonnet-4-5");
62 }
63}
64
65/**
66 * Validate that the selected provider is available

Callers 3

text-variation.tsFile · 0.90
POSTFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected