MCPcopy Create free account
hub / github.com/1Panel-dev/1Panel / normalizeCustomModel

Function normalizeCustomModel

agent/app/service/agents_utils.go:1554–1563  ·  view source on GitHub ↗
(modelName string)

Source from the content-addressed store, hash-verified

1552}
1553
1554func normalizeCustomModel(modelName string) string {
1555 trim := strings.TrimSpace(modelName)
1556 trim = strings.TrimLeft(trim, "/")
1557 if parts := strings.SplitN(trim, "/", 2); len(parts) == 2 {
1558 if strings.EqualFold(parts[0], "custom") {
1559 return strings.TrimLeft(strings.TrimSpace(parts[1]), "/")
1560 }
1561 }
1562 return trim
1563}
1564
1565func runtimeProviderModelPrefix(provider string) string {
1566 switch provider {

Callers 2

resolveHermesModelFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected