MCPcopy Create free account
hub / github.com/CopilotKit/aimock / normalizeModelName

Function normalizeModelName

src/model-utils.ts:3–9  ·  view source on GitHub ↗
(
  model: string | undefined,
  skipNormalization?: boolean,
)

Source from the content-addressed store, hash-verified

1const DATE_SUFFIX_RE = /[-](\d{8}(-v\d+([:.]\d+)*)?)$|[-]\d{4}-\d{2}-\d{2}$/;
2
3export function normalizeModelName(
4 model: string | undefined,
5 skipNormalization?: boolean,
6): string | undefined {
7 if (!model || skipNormalization) return model;
8 return model.replace(DATE_SUFFIX_RE, "");
9}
10
11// ─── Reasoning-capability map ───────────────────────────────────────────────
12//

Callers 4

parseEnvListFunction · 0.85
isReasoningModelFunction · 0.85
buildFixtureMatchFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…