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

Function buildOpenclawAccountModelConfig

agent/app/service/agents_utils.go:1055–1066  ·  view source on GitHub ↗
(account *model.AgentAccount, model dto.AgentAccountModel)

Source from the content-addressed store, hash-verified

1053}
1054
1055func 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
1068func buildOpenclawModelEntry(modelID string, model dto.AgentAccountModel) modelEntry {
1069 name := strings.TrimSpace(model.Name)

Calls 1

buildOpenclawModelEntryFunction · 0.85

Tested by

no test coverage detected