MCPcopy Create free account
hub / github.com/continuedev/continue / parseProxyModelName

Function parseProxyModelName

packages/config-yaml/src/modelName.ts:8–19  ·  view source on GitHub ↗
(modelName: string)

Source from the content-addressed store, hash-verified

6}
7
8export function parseProxyModelName(modelName: string): ProxyModelName {
9 const parts = modelName.split("/");
10
11 const [ownerSlug, packageSlug, provider, ...modelParts] = parts;
12 const model = modelParts.join("/");
13
14 if (!provider || !model) {
15 throw new Error("Invalid model format");
16 }
17
18 return { provider, model, ownerSlug, packageSlug };
19}

Callers 1

modelName.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected