Spaces:
Build error
Build error
fix: add complete default config with gateway auth token
Browse filesThe default config was missing gateway.auth.token which caused
Gateway to exit with 'no token is configured' error.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- scripts/sync_hf.py +37 -3
scripts/sync_hf.py
CHANGED
|
@@ -127,13 +127,47 @@ class OpenClawHFSync:
|
|
| 127 |
if not config_path.exists():
|
| 128 |
print("[SYNC] No openclaw.json found after restore. Creating default.")
|
| 129 |
default_conf = {
|
| 130 |
-
"gateway": {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 131 |
"session": {"scope": "global"},
|
| 132 |
"models": {
|
| 133 |
"mode": "merge",
|
| 134 |
-
"providers": {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 135 |
},
|
| 136 |
-
"plugins": {"entries": {}},
|
| 137 |
"agents": {
|
| 138 |
"defaults": {
|
| 139 |
"workspace": "~/.openclaw/workspace",
|
|
|
|
| 127 |
if not config_path.exists():
|
| 128 |
print("[SYNC] No openclaw.json found after restore. Creating default.")
|
| 129 |
default_conf = {
|
| 130 |
+
"gateway": {
|
| 131 |
+
"mode": "local",
|
| 132 |
+
"bind": "lan",
|
| 133 |
+
"port": 7860,
|
| 134 |
+
"auth": {"token": "openclaw-space-default"},
|
| 135 |
+
"controlUi": {
|
| 136 |
+
"allowInsecureAuth": true,
|
| 137 |
+
"allowedOrigins": [
|
| 138 |
+
"https://tao-shen-openclaw-ai.hf.space",
|
| 139 |
+
"https://huggingface.co"
|
| 140 |
+
]
|
| 141 |
+
}
|
| 142 |
+
},
|
| 143 |
"session": {"scope": "global"},
|
| 144 |
"models": {
|
| 145 |
"mode": "merge",
|
| 146 |
+
"providers": {
|
| 147 |
+
"zhipu": {
|
| 148 |
+
"baseUrl": "https://open.bigmodel.cn/api/paas/v4",
|
| 149 |
+
"apiKey": "<ENV_VAR>",
|
| 150 |
+
"api": "openai-completions",
|
| 151 |
+
"models": [
|
| 152 |
+
{"id": "glm-4-plus", "name": "GLM-4 Plus"},
|
| 153 |
+
{"id": "glm-4-flash", "name": "GLM-4 Flash"}
|
| 154 |
+
]
|
| 155 |
+
},
|
| 156 |
+
"hf": {
|
| 157 |
+
"baseUrl": "https://router.huggingface.co/v1",
|
| 158 |
+
"apiKey": "<ENV_VAR>",
|
| 159 |
+
"api": "openai-completions",
|
| 160 |
+
"models": [
|
| 161 |
+
{"id": "Qwen/Qwen2.5-7B-Instruct", "name": "Qwen2.5 7B (HF Router)"}
|
| 162 |
+
]
|
| 163 |
+
}
|
| 164 |
+
}
|
| 165 |
+
},
|
| 166 |
+
"plugins": {
|
| 167 |
+
"entries": {
|
| 168 |
+
"whatsapp": {"enabled": true}
|
| 169 |
+
}
|
| 170 |
},
|
|
|
|
| 171 |
"agents": {
|
| 172 |
"defaults": {
|
| 173 |
"workspace": "~/.openclaw/workspace",
|