MCPcopy
hub / github.com/coder/mux / getModelProvider

Function getModelProvider

src/common/utils/ai/models.ts:121–128  ·  view source on GitHub ↗
(modelString: string)

Source from the content-addressed store, hash-verified

119 * @returns The provider part (before the colon), or empty string if no colon is found
120 */
121export function getModelProvider(modelString: string): string {
122 const normalized = normalizeToCanonical(modelString);
123 const colonIndex = normalized.indexOf(":");
124 if (colonIndex === -1) {
125 return "";
126 }
127 return normalized.substring(0, colonIndex);
128}
129
130export type Anthropic1MContextMode = "none" | "beta" | "native";
131

Callers 6

ModelSelector.tsxFile · 0.90
StreamErrorMessageBaseFunction · 0.90
ModelDisplayFunction · 0.90
SearchableModelSelectFunction · 0.90
normalizeProviderNameFunction · 0.90

Calls 1

normalizeToCanonicalFunction · 0.85

Tested by

no test coverage detected