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

Function extractOpenclawPrimaryModelID

agent/app/service/agents_utils.go:920–931  ·  view source on GitHub ↗
(conf map[string]interface{}, account *model.AgentAccount, accountModels []dto.AgentAccountModel)

Source from the content-addressed store, hash-verified

918}
919
920func extractOpenclawPrimaryModelID(conf map[string]interface{}, account *model.AgentAccount, accountModels []dto.AgentAccountModel) string {
921 modelMap := openclawModelRefMap(conf)
922 primary := strings.TrimSpace(fmt.Sprintf("%v", modelMap["primary"]))
923 if primary == "" {
924 return ""
925 }
926 resolved, err := buildOpenclawResolvedModelIDMap(account, accountModels)
927 if err != nil {
928 return ""
929 }
930 return resolved[primary]
931}
932
933func extractOpenclawFallbackModelIDs(conf map[string]interface{}, account *model.AgentAccount, accountModels []dto.AgentAccountModel, primaryModel string) []string {
934 modelMap := openclawModelRefMap(conf)

Callers 1

GetModelConfigMethod · 0.85

Calls 2

openclawModelRefMapFunction · 0.85

Tested by

no test coverage detected