Update fallback model references to use openai-codex/gpt-5.4 in README, guide, and setup script
Browse files- README.md +6 -6
- guide.md +9 -9
- setup-hf-config.mjs +1 -1
README.md
CHANGED
|
@@ -29,12 +29,12 @@ This Space runs the [OpenClaw](https://github.com/openclaw/openclaw) gateway so
|
|
| 29 |
- **`SUPABASE_KEY`** — (recommended) Supabase service key or project API key with insert/update access to your sync table.
|
| 30 |
- **`OPENCLAW_MODEL_PRIMARY`** — (recommended) Primary model ref. This repo now defaults to `huggingface/Qwen/Qwen3-8B`.
|
| 31 |
- **`OPENCLAW_MODEL_FALLBACK_1`** — (recommended) First fallback model ref. Default is `huggingface/deepseek-ai/DeepSeek-R1`.
|
| 32 |
-
- **`OPENCLAW_MODEL_FALLBACK_2`** — (recommended) Second fallback model ref. Default is `
|
| 33 |
- **`OPENCLAW_GATEWAY_TRUSTED_PROXIES`** — (optional) Comma-separated proxy IPs (e.g. `10.20.31.87,10.20.26.157`). The startup script writes this into `gateway.trustedProxies`; set if you see “Proxy headers detected from untrusted address” or pairing/unauthorized. Use **Variables** if you prefer (IPs need not be secret).
|
| 34 |
- **`OPENCLAW_CONTROL_UI_ALLOWED_ORIGINS`** — (optional) Comma-separated origins (e.g. `https://your-space.hf.space`). Written to `gateway.controlUi.allowedOrigins` so only those origins can open the Control UI; useful to lock down to your Space URL.
|
| 35 |
- **`TELEGRAM_BOT_TOKEN`** — (optional) Telegram BotFather token. This is the only Telegram setting you need for a minimal setup.
|
| 36 |
- **`OPENCLAW_TELEGRAM_DM_POLICY`** / **`OPENCLAW_TELEGRAM_ALLOW_FROM`** / **`OPENCLAW_TELEGRAM_GROUP_POLICY`** / **`OPENCLAW_TELEGRAM_GROUP_ALLOW_FROM`** / **`OPENCLAW_TELEGRAM_REQUIRE_MENTION`** — (optional) Advanced Telegram access-control settings.
|
| 37 |
-
4. **Build and run** — push to the Space repo; the Space will build and start the gateway. Startup writes config so the default model chain is `Qwen3-8B -> DeepSeek-R1 ->
|
| 38 |
|
| 39 |
When the logs show `listening on ws://0.0.0.0:7860`, open your Space’s URL (e.g. `https://your-username-openclaw-gateway.hf.space`) and paste the gateway token in **Settings → token** (or use `https://your-space.hf.space#token=YOUR_TOKEN`).
|
| 40 |
|
|
@@ -42,11 +42,11 @@ When the logs show `listening on ws://0.0.0.0:7860`, open your Space’s URL (e.
|
|
| 42 |
|
| 43 |
- **Default behavior in this repo** is now:
|
| 44 |
- primary: `huggingface/Qwen/Qwen3-8B`
|
| 45 |
-
- fallbacks: `huggingface/deepseek-ai/DeepSeek-R1`, `
|
| 46 |
- **The startup script now writes both `primary` and `fallbacks`.**
|
| 47 |
-
- **Codex fallback only works if Codex itself is already authenticated and usable.** If `
|
| 48 |
- **OpenCode Zen** also works well in Hugging Face Spaces. Set `OPENCODE_API_KEY` and use a default model such as `opencode/claude-opus-4-6`.
|
| 49 |
-
- **Codex auth remains the special case**: if your `
|
| 50 |
- **Telegram minimal setup** only needs `TELEGRAM_BOT_TOKEN`.
|
| 51 |
- **Telegram advanced settings** are optional and only needed when you want allowlists, group restrictions, or mention-only behavior.
|
| 52 |
|
|
@@ -62,7 +62,7 @@ TELEGRAM_BOT_TOKEN=<botfather token>
|
|
| 62 |
Variables
|
| 63 |
OPENCLAW_MODEL_PRIMARY=huggingface/Qwen/Qwen3-8B
|
| 64 |
OPENCLAW_MODEL_FALLBACK_1=huggingface/deepseek-ai/DeepSeek-R1
|
| 65 |
-
OPENCLAW_MODEL_FALLBACK_2=
|
| 66 |
OPENCLAW_CONTROL_UI_ALLOWED_ORIGINS=https://your-space.hf.space
|
| 67 |
OPENCLAW_SUPABASE_TABLE=openclaw_state
|
| 68 |
OPENCLAW_SYNC_INTERVAL_MS=300000
|
|
|
|
| 29 |
- **`SUPABASE_KEY`** — (recommended) Supabase service key or project API key with insert/update access to your sync table.
|
| 30 |
- **`OPENCLAW_MODEL_PRIMARY`** — (recommended) Primary model ref. This repo now defaults to `huggingface/Qwen/Qwen3-8B`.
|
| 31 |
- **`OPENCLAW_MODEL_FALLBACK_1`** — (recommended) First fallback model ref. Default is `huggingface/deepseek-ai/DeepSeek-R1`.
|
| 32 |
+
- **`OPENCLAW_MODEL_FALLBACK_2`** — (recommended) Second fallback model ref. Default is `openai-codex/gpt-5.4`.
|
| 33 |
- **`OPENCLAW_GATEWAY_TRUSTED_PROXIES`** — (optional) Comma-separated proxy IPs (e.g. `10.20.31.87,10.20.26.157`). The startup script writes this into `gateway.trustedProxies`; set if you see “Proxy headers detected from untrusted address” or pairing/unauthorized. Use **Variables** if you prefer (IPs need not be secret).
|
| 34 |
- **`OPENCLAW_CONTROL_UI_ALLOWED_ORIGINS`** — (optional) Comma-separated origins (e.g. `https://your-space.hf.space`). Written to `gateway.controlUi.allowedOrigins` so only those origins can open the Control UI; useful to lock down to your Space URL.
|
| 35 |
- **`TELEGRAM_BOT_TOKEN`** — (optional) Telegram BotFather token. This is the only Telegram setting you need for a minimal setup.
|
| 36 |
- **`OPENCLAW_TELEGRAM_DM_POLICY`** / **`OPENCLAW_TELEGRAM_ALLOW_FROM`** / **`OPENCLAW_TELEGRAM_GROUP_POLICY`** / **`OPENCLAW_TELEGRAM_GROUP_ALLOW_FROM`** / **`OPENCLAW_TELEGRAM_REQUIRE_MENTION`** — (optional) Advanced Telegram access-control settings.
|
| 37 |
+
4. **Build and run** — push to the Space repo; the Space will build and start the gateway. Startup writes config so the default model chain is `Qwen3-8B -> DeepSeek-R1 -> openai-codex/gpt-5.4`, the Control UI accepts token-only connections (no device pairing), and Supabase sync starts automatically when `SUPABASE_URL` + `SUPABASE_KEY` are present.
|
| 38 |
|
| 39 |
When the logs show `listening on ws://0.0.0.0:7860`, open your Space’s URL (e.g. `https://your-username-openclaw-gateway.hf.space`) and paste the gateway token in **Settings → token** (or use `https://your-space.hf.space#token=YOUR_TOKEN`).
|
| 40 |
|
|
|
|
| 42 |
|
| 43 |
- **Default behavior in this repo** is now:
|
| 44 |
- primary: `huggingface/Qwen/Qwen3-8B`
|
| 45 |
+
- fallbacks: `huggingface/deepseek-ai/DeepSeek-R1`, `openai-codex/gpt-5.4`
|
| 46 |
- **The startup script now writes both `primary` and `fallbacks`.**
|
| 47 |
+
- **Codex fallback only works if Codex itself is already authenticated and usable.** If `openai-codex/gpt-5.4` still lacks auth, fallback will still fail when traffic reaches it.
|
| 48 |
- **OpenCode Zen** also works well in Hugging Face Spaces. Set `OPENCODE_API_KEY` and use a default model such as `opencode/claude-opus-4-6`.
|
| 49 |
+
- **Codex auth remains the special case**: if your `openai-codex/gpt-5.4` path depends on OAuth-backed credentials, use a separate environment that can complete the login flow first, or expect the Codex fallback to fail.
|
| 50 |
- **Telegram minimal setup** only needs `TELEGRAM_BOT_TOKEN`.
|
| 51 |
- **Telegram advanced settings** are optional and only needed when you want allowlists, group restrictions, or mention-only behavior.
|
| 52 |
|
|
|
|
| 62 |
Variables
|
| 63 |
OPENCLAW_MODEL_PRIMARY=huggingface/Qwen/Qwen3-8B
|
| 64 |
OPENCLAW_MODEL_FALLBACK_1=huggingface/deepseek-ai/DeepSeek-R1
|
| 65 |
+
OPENCLAW_MODEL_FALLBACK_2=openai-codex/gpt-5.4
|
| 66 |
OPENCLAW_CONTROL_UI_ALLOWED_ORIGINS=https://your-space.hf.space
|
| 67 |
OPENCLAW_SUPABASE_TABLE=openclaw_state
|
| 68 |
OPENCLAW_SYNC_INTERVAL_MS=300000
|
guide.md
CHANGED
|
@@ -8,14 +8,14 @@
|
|
| 8 |
|
| 9 |
1. `huggingface/Qwen/Qwen3-8B`
|
| 10 |
2. `huggingface/deepseek-ai/DeepSeek-R1`
|
| 11 |
-
3. `
|
| 12 |
|
| 13 |
注意:
|
| 14 |
|
| 15 |
- `Qwen` 是 primary
|
| 16 |
- `DeepSeek` 是第一個 fallback
|
| 17 |
-
- `
|
| 18 |
-
- `
|
| 19 |
|
| 20 |
## 你在 HF Space 要放的檔案
|
| 21 |
|
|
@@ -53,7 +53,7 @@ TELEGRAM_BOT_TOKEN=<你的 telegram bot token>
|
|
| 53 |
```text
|
| 54 |
OPENCLAW_MODEL_PRIMARY=huggingface/Qwen/Qwen3-8B
|
| 55 |
OPENCLAW_MODEL_FALLBACK_1=huggingface/deepseek-ai/DeepSeek-R1
|
| 56 |
-
OPENCLAW_MODEL_FALLBACK_2=
|
| 57 |
OPENCLAW_CONTROL_UI_ALLOWED_ORIGINS=https://你的-space-url.hf.space
|
| 58 |
OPENCLAW_SUPABASE_TABLE=openclaw_state
|
| 59 |
OPENCLAW_SYNC_INTERVAL_MS=300000
|
|
@@ -101,7 +101,7 @@ TELEGRAM_BOT_TOKEN=<你的 bot token>
|
|
| 101 |
原因:
|
| 102 |
|
| 103 |
- OpenClaw 狀態會存在 `/data/.openclaw`
|
| 104 |
-
- 如果之後 `
|
| 105 |
|
| 106 |
## 部署後怎麼檢查
|
| 107 |
|
|
@@ -119,9 +119,9 @@ TELEGRAM_BOT_TOKEN=<你的 bot token>
|
|
| 119 |
2. 可以用 `OPENCLAW_GATEWAY_TOKEN` 登入
|
| 120 |
3. Supabase 的 `openclaw_state` 有同步資料
|
| 121 |
|
| 122 |
-
## 關於 `
|
| 123 |
|
| 124 |
-
目前 `
|
| 125 |
|
| 126 |
這樣做的好處是:
|
| 127 |
|
|
@@ -131,7 +131,7 @@ TELEGRAM_BOT_TOKEN=<你的 bot token>
|
|
| 131 |
|
| 132 |
但要注意:
|
| 133 |
|
| 134 |
-
- 如果 `
|
| 135 |
- 真正切到第三個 fallback 時,仍然可能失敗
|
| 136 |
|
| 137 |
所以目前最穩的理解方式是:
|
|
@@ -155,7 +155,7 @@ SUPABASE_KEY
|
|
| 155 |
```text
|
| 156 |
OPENCLAW_MODEL_PRIMARY=huggingface/Qwen/Qwen3-8B
|
| 157 |
OPENCLAW_MODEL_FALLBACK_1=huggingface/deepseek-ai/DeepSeek-R1
|
| 158 |
-
OPENCLAW_MODEL_FALLBACK_2=
|
| 159 |
```
|
| 160 |
|
| 161 |
### 建議 Variables
|
|
|
|
| 8 |
|
| 9 |
1. `huggingface/Qwen/Qwen3-8B`
|
| 10 |
2. `huggingface/deepseek-ai/DeepSeek-R1`
|
| 11 |
+
3. `openai-codex/gpt-5.4`
|
| 12 |
|
| 13 |
注意:
|
| 14 |
|
| 15 |
- `Qwen` 是 primary
|
| 16 |
- `DeepSeek` 是第一個 fallback
|
| 17 |
+
- `openai-codex/gpt-5.4` 是第二個 fallback
|
| 18 |
+
- `openai-codex/gpt-5.4` 只有在它本身已經可用時,fallback 才會成功
|
| 19 |
|
| 20 |
## 你在 HF Space 要放的檔案
|
| 21 |
|
|
|
|
| 53 |
```text
|
| 54 |
OPENCLAW_MODEL_PRIMARY=huggingface/Qwen/Qwen3-8B
|
| 55 |
OPENCLAW_MODEL_FALLBACK_1=huggingface/deepseek-ai/DeepSeek-R1
|
| 56 |
+
OPENCLAW_MODEL_FALLBACK_2=openai-codex/gpt-5.4
|
| 57 |
OPENCLAW_CONTROL_UI_ALLOWED_ORIGINS=https://你的-space-url.hf.space
|
| 58 |
OPENCLAW_SUPABASE_TABLE=openclaw_state
|
| 59 |
OPENCLAW_SYNC_INTERVAL_MS=300000
|
|
|
|
| 101 |
原因:
|
| 102 |
|
| 103 |
- OpenClaw 狀態會存在 `/data/.openclaw`
|
| 104 |
+
- 如果之後 `openai-codex/gpt-5.4` 要用到持久化 auth,沒有 persistent storage 會不穩
|
| 105 |
|
| 106 |
## 部署後怎麼檢查
|
| 107 |
|
|
|
|
| 119 |
2. 可以用 `OPENCLAW_GATEWAY_TOKEN` 登入
|
| 120 |
3. Supabase 的 `openclaw_state` 有同步資料
|
| 121 |
|
| 122 |
+
## 關於 `openai-codex/gpt-5.4`
|
| 123 |
|
| 124 |
+
目前 `openai-codex/gpt-5.4` 是 fallback,不是 primary。
|
| 125 |
|
| 126 |
這樣做的好處是:
|
| 127 |
|
|
|
|
| 131 |
|
| 132 |
但要注意:
|
| 133 |
|
| 134 |
+
- 如果 `openai-codex/gpt-5.4` 還沒完成它需要的登入或授權
|
| 135 |
- 真正切到第三個 fallback 時,仍然可能失敗
|
| 136 |
|
| 137 |
所以目前最穩的理解方式是:
|
|
|
|
| 155 |
```text
|
| 156 |
OPENCLAW_MODEL_PRIMARY=huggingface/Qwen/Qwen3-8B
|
| 157 |
OPENCLAW_MODEL_FALLBACK_1=huggingface/deepseek-ai/DeepSeek-R1
|
| 158 |
+
OPENCLAW_MODEL_FALLBACK_2=openai-codex/gpt-5.4
|
| 159 |
```
|
| 160 |
|
| 161 |
### 建議 Variables
|
setup-hf-config.mjs
CHANGED
|
@@ -67,7 +67,7 @@ const defaultModel =
|
|
| 67 |
const fallbackModels =
|
| 68 |
fallbackModelsFromIndexedEnv.length > 0
|
| 69 |
? fallbackModelsFromIndexedEnv
|
| 70 |
-
: ["huggingface/deepseek-ai/DeepSeek-R1", "
|
| 71 |
const gatewayToken = readGatewayToken();
|
| 72 |
const gatewayPassword = process.env.OPENCLAW_GATEWAY_PASSWORD?.trim();
|
| 73 |
const telegramBotToken = process.env.TELEGRAM_BOT_TOKEN?.trim();
|
|
|
|
| 67 |
const fallbackModels =
|
| 68 |
fallbackModelsFromIndexedEnv.length > 0
|
| 69 |
? fallbackModelsFromIndexedEnv
|
| 70 |
+
: ["huggingface/deepseek-ai/DeepSeek-R1", "openai-codex/gpt-5.4"];
|
| 71 |
const gatewayToken = readGatewayToken();
|
| 72 |
const gatewayPassword = process.env.OPENCLAW_GATEWAY_PASSWORD?.trim();
|
| 73 |
const telegramBotToken = process.env.TELEGRAM_BOT_TOKEN?.trim();
|