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

Function sameProviderModelID

agent/app/service/agents_utils.go:1423–1432  ·  view source on GitHub ↗
(provider, left, right string)

Source from the content-addressed store, hash-verified

1421}
1422
1423func sameProviderModelID(provider, left, right string) bool {
1424 leftTrimmed := strings.TrimSpace(left)
1425 rightTrimmed := strings.TrimSpace(right)
1426 if leftTrimmed == rightTrimmed {
1427 return true
1428 }
1429 leftComparable := normalizeComparableProviderModelID(provider, leftTrimmed)
1430 rightComparable := normalizeComparableProviderModelID(provider, rightTrimmed)
1431 return leftComparable != "" && leftComparable == rightComparable
1432}
1433
1434func findAgentAccountModelForProvider(provider string, models []dto.AgentAccountModel, modelID string) (dto.AgentAccountModel, bool) {
1435 for _, item := range models {

Calls 1

Tested by

no test coverage detected