(account *model.AgentAccount, model dto.AgentAccountModel)
| 1053 | } |
| 1054 | |
| 1055 | func buildOpenclawAccountModelConfig(account *model.AgentAccount, model dto.AgentAccountModel) (string, modelEntry, string, modelProvider, error) { |
| 1056 | providerPatch, err := providercatalog.BuildOpenClawProviderPatch(account.Provider, model.ID, account.APIType, account.BaseURL, account.APIKey) |
| 1057 | if err != nil { |
| 1058 | return "", modelEntry{}, "", modelProvider{}, err |
| 1059 | } |
| 1060 | return providerPatch.PrimaryModel, buildOpenclawModelEntry(providerPatch.ModelID, model), providerPatch.ProviderKey, modelProvider{ |
| 1061 | ApiKey: providerPatch.APIKey, |
| 1062 | BaseUrl: providerPatch.BaseURL, |
| 1063 | Api: providerPatch.APIType, |
| 1064 | AuthHeader: providerPatch.AuthHeader, |
| 1065 | }, nil |
| 1066 | } |
| 1067 | |
| 1068 | func buildOpenclawModelEntry(modelID string, model dto.AgentAccountModel) modelEntry { |
| 1069 | name := strings.TrimSpace(model.Name) |
no test coverage detected