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

Function parseEnvList

src/model-utils.ts:101–107  ·  view source on GitHub ↗
(raw: string | undefined)

Source from the content-addressed store, hash-verified

99// (date-suffix + provider/region prefix stripped, lowercased) so a prefixed
100// entry such as `anthropic.claude-opus-4` matches the already-stripped id.
101function parseEnvList(raw: string | undefined): string[] {
102 if (!raw) return [];
103 return raw
104 .split(",")
105 .map((s) => stripProviderPrefix(normalizeModelName(s.trim())?.toLowerCase() ?? ""))
106 .filter((s) => s.length > 0);
107}
108
109function matchesAny(id: string, families: readonly string[]): boolean {
110 return families.some((fam) => id.startsWith(fam));

Callers 1

isReasoningModelFunction · 0.85

Calls 2

stripProviderPrefixFunction · 0.85
normalizeModelNameFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…