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

Function providerNameFromModelString

src/node/services/aiService.test.ts:278–280  ·  view source on GitHub ↗
(modelString: string)

Source from the content-addressed store, hash-verified

276}
277
278function providerNameFromModelString(modelString: string): ProviderName {
279 return modelString.startsWith("anthropic:") ? "anthropic" : "openai";
280}
281
282function modelIdFromModelString(modelString: string): string {
283 return modelString.includes(":") ? (modelString.split(":").at(1) ?? modelString) : modelString;

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected