Somrat Sorkar commited on
Commit
00c3396
·
1 Parent(s): 8f0d1fd

Remove agents config - use environment variable for model instead

Browse files
Files changed (1) hide show
  1. start.sh +2 -11
start.sh CHANGED
@@ -149,17 +149,6 @@ CONFIGEOF
149
  # Gateway token
150
  CONFIG_JSON=$(echo "$CONFIG_JSON" | jq ".gateway.auth.token = \"$GATEWAY_TOKEN\"")
151
 
152
- # Add agents object with model configuration
153
- CONFIG_JSON=$(echo "$CONFIG_JSON" | jq ".agents = {
154
- \"main\": {
155
- \"kind\": \"main\",
156
- \"sandbox\": \"require\",
157
- \"defaults\": {
158
- \"model\": \"$LLM_MODEL\"
159
- }
160
- }
161
- }")
162
-
163
  # Control UI origin (allow HF Space URL for web UI access)
164
  if [ -n "$SPACE_HOST" ]; then
165
  CONFIG_JSON=$(echo "$CONFIG_JSON" | jq ".gateway.controlUi.allowedOrigins = [\"https://${SPACE_HOST}\"]")
@@ -247,6 +236,8 @@ node /home/node/app/health-server.js &
247
  # ── Launch gateway ──
248
  echo "🚀 Launching OpenClaw gateway on port 7860..."
249
  echo ""
 
 
250
  openclaw gateway run --port 7860 --bind lan --verbose 2>&1 | tee -a /home/node/.openclaw/gateway.log &
251
  GATEWAY_PID=$!
252
 
 
149
  # Gateway token
150
  CONFIG_JSON=$(echo "$CONFIG_JSON" | jq ".gateway.auth.token = \"$GATEWAY_TOKEN\"")
151
 
 
 
 
 
 
 
 
 
 
 
 
152
  # Control UI origin (allow HF Space URL for web UI access)
153
  if [ -n "$SPACE_HOST" ]; then
154
  CONFIG_JSON=$(echo "$CONFIG_JSON" | jq ".gateway.controlUi.allowedOrigins = [\"https://${SPACE_HOST}\"]")
 
236
  # ── Launch gateway ──
237
  echo "🚀 Launching OpenClaw gateway on port 7860..."
238
  echo ""
239
+ # Set model via environment for the gateway
240
+ export LLM_MODEL="$LLM_MODEL"
241
  openclaw gateway run --port 7860 --bind lan --verbose 2>&1 | tee -a /home/node/.openclaw/gateway.log &
242
  GATEWAY_PID=$!
243