Skip to content

Commit abefaaf

Browse files
authored
Merge branch 'main' into fix/1200-notification-baseline
2 parents d279581 + 6293358 commit abefaaf

18 files changed

Lines changed: 65 additions & 437 deletions

.codex

Whitespace-only changes.

.env.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ GEMINI_API_KEY=
237237
# LLM_OPENROUTER_MODELS=~anthropic/claude-sonnet-latest,~openai/gpt-latest
238238
# LITELLM_MODEL=openai/~anthropic/claude-sonnet-latest
239239

240-
# 高级:模型路由 YAML 配置(可选,参考 litellm_config.example.yaml)
240+
# 高级:模型路由 YAML 配置(可选,参考 docs/examples/litellm_config.example.yaml)
241241
# LITELLM_CONFIG=./litellm_config.yaml
242242

243243
# ===================================

.github/workflows/network-smoke.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
continue-on-error: true
4141
run: |
4242
set -o pipefail
43-
./test.sh quick --no-notify | tee quick-smoke.log
43+
./scripts/test.sh quick --no-notify | tee quick-smoke.log
4444
4545
- name: 📤 Upload smoke logs
4646
if: always()

.gitignore

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,13 @@
88
# 测试文件(可能包含敏感配置)
99
# 仅忽略仓库根目录下的临时 test_*.py 脚本;tests/ 目录下的单元测试需要纳入版本控制。
1010
/test_*.py
11-
!test_env.py
11+
/test.sh
12+
13+
# 本地评审与高级路由配置(可能包含敏感信息或临时分析产物)
14+
/.codex
15+
/review.md
16+
/litellm_config.yaml
17+
/litellm_config.*.yaml
1218

1319
# Python
1420
__pycache__/
@@ -78,5 +84,3 @@ verify_*.py
7884
static/
7985
/apps/dsa-desktop/dist/
8086
/apps/dsa-desktop/node_modules/
81-
82-
.codex

AGENTS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ gh run view <run_id> --log-failed
138138
| `backend-gate` | `.github/workflows/ci.yml` | 执行 `./scripts/ci_gate.sh` ||
139139
| `docker-build` | `.github/workflows/ci.yml` | Docker 构建与关键模块导入 smoke ||
140140
| `web-gate` | `.github/workflows/ci.yml` | 前端改动时执行 `npm run lint` + `npm run build` | 是(触发时) |
141-
| `network-smoke` | `.github/workflows/network-smoke.yml` | `pytest -m network` + `test.sh quick` | 否,观测项 |
141+
| `network-smoke` | `.github/workflows/network-smoke.yml` | `pytest -m network` + `scripts/test.sh quick` | 否,观测项 |
142142
| `pr-review` | `.github/workflows/pr-review.yml` | PR 静态检查 + AI 审查 + 自动标签 | 否,辅助项 |
143143

144144
若 PR 上已有对应 CI 结果,可直接引用 CI 结论;若 CI 未覆盖改动面,或本地与 CI 环境差异较大,需要补充说明本地验证与缺口。

docs/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/).
1313
<!-- 每条独立一行追加到本段末尾,无需分类标题,合并时冲突最小 -->
1414
- [改进] 放宽 LiteLLM 依赖约束,保留 `>=1.80.10` 最低版本并显式排除 PyPI 事故版本 `1.82.7` / `1.82.8`,允许安装后续 1.x 修复版本。
1515
- [改进] 补齐通知渠道 P0 基线、Actions 映射与 `--check-notify` 只读诊断,完善 AstrBot 配置入口和通知回归快照。
16+
- [chore] 清理仓库根目录:移除误入库的 `.codex``review.md` 跟踪记录,将 smoke 测试入口迁移到 `scripts/`、环境检查脚本迁移为 `scripts/check_env.py`,并将 LiteLLM YAML 示例迁移到 `docs/examples/`
1617

1718
## [3.15.0] - 2026-05-05
1819

docs/CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ docs: 更新 README 部署说明
8181
| backend-gate | `scripts/ci_gate.sh`(py_compile + flake8 严重错误 + 本地核心脚本 + offline pytest) ||
8282
| docker-build | Docker 镜像构建与关键模块导入 smoke ||
8383
| web-gate | 前端变更时执行 `npm run lint` + `npm run build` | ✅(触发时) |
84-
| network-smoke | 定时/手动执行 `pytest -m network` + `test.sh quick`(非阻断) | ❌(观测项) |
84+
| network-smoke | 定时/手动执行 `pytest -m network` + `scripts/test.sh quick`(非阻断) | ❌(观测项) |
8585

8686
**本地运行检查:**
8787

docs/CONTRIBUTING_EN.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ After opening a PR, CI will automatically run the following PR checks:
8080

8181
| Check | Description | Required |
8282
|-------|-------------|:--------:|
83-
| `backend-gate` | `scripts/ci_gate.sh` — py_compile + flake8 critical errors + `./test.sh code` + `./test.sh yfinance` + offline pytest ||
83+
| `backend-gate` | `scripts/ci_gate.sh` — py_compile + flake8 critical errors + `./scripts/test.sh code` + `./scripts/test.sh yfinance` + offline pytest ||
8484
| `docker-build` | Docker image build and key module import smoke test ||
8585
| `web-gate` | `npm run lint` + `npm run build` (triggered when `apps/dsa-web/` changes) | ✅ (when triggered) |
8686

docs/FAQ.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,9 @@ PROXY_PORT=10809
132132

133133
系统按优先级只取一种:高级模型路由 YAML(`LITELLM_CONFIG`)> `LLM_CHANNELS` > legacy keys。但 YAML 仅在文件可正常解析且产出了有效 `model_list` 时才生效;如果 YAML 路径无效或内容为空,系统会自动回退到 `LLM_CHANNELS` 或 legacy keys。一旦某一层级实际生效,更低优先级的配置不参与解析。
134134

135-
**Q: test_env 输出“未配置可用 AI 模型”怎么办?**
135+
**Q: check_env 输出“未配置可用 AI 模型”怎么办?**
136136

137-
默认先选一种服务商并填写对应 API Key;如果需要固定主模型,再补 `LITELLM_MODEL=provider/model`;如果要多模型切换,再配置 `LLM_CHANNELS` 或高级模型路由 YAML。运行 `python test_env.py --config` 校验配置,`python test_env.py --llm` 实际调用 API 测试。
137+
默认先选一种服务商并填写对应 API Key;如果需要固定主模型,再补 `LITELLM_MODEL=provider/model`;如果要多模型切换,再配置 `LLM_CHANNELS` 或高级模型路由 YAML。运行 `python scripts/check_env.py --config` 校验配置,`python scripts/check_env.py --llm` 实际调用 API 测试。
138138

139139
**Q: 如何同时使用多个模型(如 AIHubmix + DeepSeek + Gemini)?**
140140

docs/FAQ_EN.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,9 @@ PROXY_PORT=10809
130130

131131
The system uses exactly one mode by priority: advanced YAML routing (`LITELLM_CONFIG`) > `LLM_CHANNELS` > legacy keys. However, YAML routing only takes effect when the file can be parsed successfully and yields a non-empty `model_list`; if the YAML path is invalid or the content is empty, the system automatically falls back to `LLM_CHANNELS` or legacy keys. Once a tier is active, lower-priority tiers are not used.
132132

133-
**Q: test_env says no usable AI model is configured, what should I do?**
133+
**Q: check_env says no usable AI model is configured, what should I do?**
134134

135-
Start with one provider and its API key. If you want to pin a primary model, add `LITELLM_MODEL=provider/model`. If you need multi-model switching, configure `LLM_CHANNELS` or advanced YAML routing. Run `python test_env.py --config` to validate config and `python test_env.py --llm` to actually call the API.
135+
Start with one provider and its API key. If you want to pin a primary model, add `LITELLM_MODEL=provider/model`. If you need multi-model switching, configure `LLM_CHANNELS` or advanced YAML routing. Run `python scripts/check_env.py --config` to validate config and `python scripts/check_env.py --llm` to actually call the API.
136136

137137
**Q: How to use multiple models at once (e.g. AIHubmix + DeepSeek + Gemini)?**
138138

0 commit comments

Comments
 (0)