Skip to content

Commit 6ab7936

Browse files
committed
chore(config): 默认模型改 deepseek-v4.1-flash
glm-5.2 已被新一代取代(不在默认列表里),六条渠道都已上架 deepseek-v4.1-flash(Qoder 走别名 dfmodel),默认值改用它。 同步 docker-compose、README/README.en 配置表与 test_settings 断言。
1 parent f9f0d6d commit 6ab7936

5 files changed

Lines changed: 7 additions & 5 deletions

File tree

‎README.en.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ Key variables below; the full list is in `src/config.py` (authoritative), and **
429429
| `USERS_FILE` | `secrets/users.txt` | **Bootstrap-only**: legacy user file imported once (idempotent) |
430430
| `PUBLIC_BASE_URL` | `http://127.0.0.1:8000` | Browser-reachable address; TRAE login callback depends on it |
431431
| `DATA_DIR` | `./data` | SQLite and runtime data directory |
432-
| `DEFAULT_MODEL` | `glm-5.2` | Model when empty/`auto` |
432+
| `DEFAULT_MODEL` | `deepseek-v4.1-flash` | Model when empty/`auto` |
433433
| `QUOTA_PROBE_MINUTES` | `60` | Quota probe interval (floor 1) |
434434
| `REFRESH_INTERVAL_MINUTES` | `30` | Token pre-refresh polling interval (floor 5); short-lived channels cap their window wider than this |
435435
| `MODEL_CATALOG_MINUTES` | `30` | Channel catalog fallback refresh (floor 5) |

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -602,7 +602,7 @@ python3 scripts/restore_db.py data/backups/coding2api-20261014-030000.sqlite3 --
602602
| `USERS_FILE` | `secrets/users.txt` | **仅引导期**:老式用户文件路径,启动时一次性导入 SQLite(幂等)。账号唯一源是 `users` 表 |
603603
| `PUBLIC_BASE_URL` | `http://127.0.0.1:8000` | 浏览器可达地址;TRAE 登录回调(`+/authorize`)依赖它,scheme 为 https 时额外下发 HSTS。**不决定会话 Cookie 的 `Secure`**——那按请求实际协议动态判定(`X-Forwarded-Proto` 优先,无该头则看 Host),同一实例 LAN(http) 与隧道(https) 双入口才能都登录 |
604604
| `DATA_DIR` | `./data` | SQLite 与运行数据目录 |
605-
| `DEFAULT_MODEL` | `glm-5.2` | 模型为空/`auto` 时的默认 |
605+
| `DEFAULT_MODEL` | `deepseek-v4.1-flash` | 模型为空/`auto` 时的默认 |
606606
| `QUOTA_PROBE_MINUTES` | `60` | 额度探测周期(下限 1 分钟) |
607607
| `REFRESH_INTERVAL_MINUTES` | `30` | token 预刷新轮询周期(下限 5 分钟);短寿命渠道的预刷新窗口封顶必须**宽于**它 |
608608
| `MODEL_CATALOG_MINUTES` | `30` | 渠道模型列表兜底刷新周期(下限 5 分钟) |

‎docker-compose.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ services:
1818
# 远程部署时必须设为浏览器可达的地址,TRAE 登录回调依赖它
1919
PUBLIC_BASE_URL: ${PUBLIC_BASE_URL:-http://127.0.0.1:8000}
2020
CODEBUDDY_API_ENDPOINT: ${CODEBUDDY_API_ENDPOINT:-https://copilot.tencent.com}
21-
DEFAULT_MODEL: ${DEFAULT_MODEL:-glm-5.2}
21+
DEFAULT_MODEL: ${DEFAULT_MODEL:-deepseek-v4.1-flash}
2222
# 模型列表黑名单(fnmatch glob,逗号分隔,完全替换语义)
2323
MODEL_BLOCKLIST: ${MODEL_BLOCKLIST:-custom_model_*,*sub*agent*,summary,browser_use_*,file_search_agent,default,seed-code-pro-*,sagitta,aquila,glm-4.*,glm-5,glm-5-turbo,glm-5.0*,glm-5.1,glm-5v-*,kimi-k2.5,kimi-k2.6,kimi-k2-thinking,minimax-m2.5,deepseek-v3-*,hunyuan-*,hy3*,deepseek-v4-*,qwen3.7-*,auto,nemotron-3-*,glm-5.2*,nemotron-3*,lfm2*,north-mini-code,openrouter-models-router,fast,balanced,deep,primary,hy4-preview,inkling-small,minimax-m2.7,kimi-k2.*,minimax-m3,gpt-5.4,gpt-5.5,laguna*,qwen3-vl-235b,seed-2.1*,xing4.0-29b-a4,glyph-cluster,qwen3.8-flash,seed-evolving}
2424
QUOTA_PROBE_MINUTES: ${QUOTA_PROBE_MINUTES:-60}

‎src/config.py‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,9 @@ class Settings(BaseSettings):
8989
provider_proxies: str = ""
9090

9191
# 路由与调度
92-
default_model: str = "glm-5.2"
92+
# 默认模型:六条渠道都已上架 `deepseek-v4.1-flash`(CB / TRAE / CodeArts /
93+
# codebuddy_intl 同名,Qoder 走别名 `dfmodel`),故默认值取它而不是老模型
94+
default_model: str = "deepseek-v4.1-flash"
9395
# token 预刷新的提前量(小时):距 access token 到期 ≤ 该值就提前换新。
9496
# 注意它对**短寿命渠道**会被自行封顶(CodeArts STS 只有 2h,见
9597
# `CodeArtsCredential.refresh_skew_cap_seconds`),所以调大它不会让短寿命

‎tests/config/test_settings.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
def test_settings_defaults_and_admin_set():
1313
s = Settings(_env_file=None, APP_SECRET=SECRET, ADMIN_USERNAMES="alice, bob ,")
1414
assert s.admin_set == frozenset({"alice", "bob"})
15-
assert s.default_model == "glm-5.2"
15+
assert s.default_model == "deepseek-v4.1-flash"
1616
assert s.quota_expiry_window_seconds == EXPIRY_WINDOW_SECONDS
1717
assert s.quota_expiry_secondary_window_seconds == SECONDARY_EXPIRY_WINDOW_SECONDS
1818
assert s.is_admin("alice") and not s.is_admin("carol")

0 commit comments

Comments
 (0)