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

Function buildOpenclawAccountModelRuntime

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

Source from the content-addressed store, hash-verified

1090}
1091
1092func buildOpenclawAccountModelRuntime(account *model.AgentAccount, model dto.AgentAccountModel) (openclawAccountModelRuntime, error) {
1093 primaryModel, _, _, _, err := buildOpenclawAccountModelConfig(account, model)
1094 if err != nil {
1095 return openclawAccountModelRuntime{}, err
1096 }
1097 return openclawAccountModelRuntime{
1098 StoredModel: model.ID,
1099 PrimaryModel: primaryModel,
1100 APIType: account.APIType,
1101 MaxTokens: model.MaxTokens,
1102 ContextWindow: model.ContextWindow,
1103 }, nil
1104}
1105
1106func resolveOpenclawAccountModelRuntimeByID(account *model.AgentAccount, modelID string) (openclawAccountModelRuntime, error) {
1107 accountModels, err := loadAgentAccountModels(account)

Callers 2

syncAgentsByAccountMethod · 0.85

Calls 1

Tested by

no test coverage detected