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

Function inferProviderFromModelString

src/node/services/workspaceTitleGenerator.ts:43–46  ·  view source on GitHub ↗
(modelString: string)

Source from the content-addressed store, hash-verified

41}
42
43function inferProviderFromModelString(modelString: string): string | undefined {
44 const provider = modelString.split(":")[0]?.trim();
45 return provider && provider.length > 0 ? provider : undefined;
46}
47
48export function mapNameGenerationError(error: unknown, modelString: string): NameGenerationError {
49 if (RetryError.isInstance(error) && error.lastError) {

Callers 2

mapNameGenerationErrorFunction · 0.85
mapModelCreationErrorFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected