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

Function sanitizeAgentAccountModelInputs

agent/app/service/agents_utils.go:1372–1390  ·  view source on GitHub ↗
(values []string)

Source from the content-addressed store, hash-verified

1370}
1371
1372func sanitizeAgentAccountModelInputs(values []string) []string {
1373 result := make([]string, 0, len(values))
1374 seen := make(map[string]struct{}, len(values))
1375 for _, value := range values {
1376 normalized := value
1377 if normalized != "text" && normalized != "image" {
1378 continue
1379 }
1380 if _, ok := seen[normalized]; ok {
1381 continue
1382 }
1383 seen[normalized] = struct{}{}
1384 result = append(result, normalized)
1385 }
1386 if len(result) == 0 {
1387 return []string{"text"}
1388 }
1389 return result
1390}
1391
1392func requiresInitialAgentAccountModels(provider string) bool {
1393 switch provider {

Calls

no outgoing calls

Tested by

no test coverage detected