Skip to content

Commit 7b3576b

Browse files
author
localai-bot
committed
fix: restore correct order of WithTunnelCallback in RunCMD
- Revert the reordering of WithTunnelCallback to maintain original order - WithTunnelCallback now comes after WithMachineTag, WithAPIAddress, WithAgentJobRetentionDays - This addresses the review comment: do not touch LLAMACPP_GRPC_SERVERS
1 parent dbb3fa4 commit 7b3576b

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

core/cli/run.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,15 +146,16 @@ func (r *RunCMD) Run(ctx *cliContext.Context) error {
146146
config.WithHttpGetExemptedEndpoints(r.HttpGetExemptedEndpoints),
147147
config.WithP2PNetworkID(r.Peer2PeerNetworkID),
148148
config.WithLoadToMemory(r.LoadToMemory),
149+
config.WithMachineTag(r.MachineTag),
150+
config.WithAPIAddress(r.Address),
151+
config.WithAgentJobRetentionDays(r.AgentJobRetentionDays),
149152
config.WithTunnelCallback(func(tunnels []string) {
150153
tunnelEnvVar := strings.Join(tunnels, ",")
151154
// TODO: this is very specific to llama.cpp, we should have a more generic way to set the environment variable
152155
os.Setenv("LLAMACPP_GRPC_SERVERS", tunnelEnvVar)
153156
xlog.Debug("setting LLAMACPP_GRPC_SERVERS", "value", tunnelEnvVar)
154157
}),
155-
config.WithMachineTag(r.MachineTag),
156-
config.WithAPIAddress(r.Address),
157-
config.WithAgentJobRetentionDays(r.AgentJobRetentionDays),
158+
158159
}
159160

160161
if r.DisableMetricsEndpoint {

0 commit comments

Comments
 (0)