MCPcopy Create free account
hub / github.com/anomalyco/models.dev / extractModelName

Function extractModelName

packages/core/script/generate-friendli.ts:66–73  ·  view source on GitHub ↗
(fullName: string)

Source from the content-addressed store, hash-verified

64}
65
66function extractModelName(fullName: string): string {
67 // "meta-llama/Llama-3.3-70B-Instruct" -> "Llama 3.3 70B Instruct"
68 const parts = fullName.split("/");
69 const modelName = parts.at(-1) ?? fullName;
70 return modelName
71 .replace(/-/g, " ")
72 .replace(/\b\w/g, (l) => l.toUpperCase());
73}
74
75// TODO: Replace with functionality.parse_reasoning from API when available
76function isReasoningModel(modelId: string): boolean {

Callers 1

mergeModelFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected