feat: configurable report language (default zh-CN)
Add providers.yaml `language` / Action input `language`; prompts and published summary/inline honor it. Soften fail-closed messaging when models 429; prefer cohere/nvidia in the first-3 parallel set for dogfood.
This commit is contained in:
1 parent
93de34d0f0
commit
ef13f8806a
10 files changed
+260
-71
No files matched your search
+15
-2
@@ -33,26 +33,39 @@ github.com runner 若不允许非 github.com Action 源,见 `docs/remote-uses.
|
||||
## 多供应商(providers.yaml)
|
||||
|
||||
```yaml
|
||||
language: zh-CN # 报告语言:zh-CN | en | …(提示词 + 汇总/inline 评论)
|
||||
|
||||
providers:
|
||||
openrouter:
|
||||
key: OPENROUTER_API_KEY # 自由命名 — 任意 secret/环境变量名
|
||||
protocol: openai # openai | openai-completions | openai-responses | anthropic
|
||||
models:
|
||||
- google/gemma-4-31b-it:free
|
||||
- google/gemma-4-26b-a4b-it:free
|
||||
- cohere/north-mini-code:free
|
||||
- nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free
|
||||
- google/gemma-4-31b-it:free
|
||||
```
|
||||
|
||||
- **`language`:报告语言**(本仓库默认 `zh-CN`)。也可用 Action 输入 `language:` 覆盖。别名 `report_language`。
|
||||
- **`key`:自由命名**,**不要**要求必须 `gatekeep_` 前缀(你也可以叫 `gatekeep_openrouter`,只是举例)。
|
||||
- 每个供应商只需:`key` + `protocol`(`base_url` / `models` 按需;已知 id 有默认 base_url)。
|
||||
- **不内置死模型清单**;启动时拉取供应商模型列表并校验名字。
|
||||
- 可混用多个供应商;只写你真正配置了的条目。
|
||||
|
||||
### 如何设置语言
|
||||
|
||||
| 方式 | 示例 |
|
||||
| --- | --- |
|
||||
| `providers.yaml` | `language: zh-CN` 或 `language: en` |
|
||||
| Action 输入(优先) | `with: { language: en }` |
|
||||
| 缺省 | 无 YAML / 无输入时回落 `en`;本仓库 defaults 已写 `zh-CN` |
|
||||
|
||||
JSON 键名与枚举值(如 `Critical`)保持英文;摘要、结论正文、inline 评论跟人读的文案跟 `language`。
|
||||
|
||||
## 输入面
|
||||
|
||||
| 项 | 含义 |
|
||||
| --- | --- |
|
||||
| `language` | 报告语言(`zh-CN` / `en` …);覆盖 YAML |
|
||||
| `key` | Secret / 环境变量名(自由) |
|
||||
| `protocol` | `openai` / `openai-completions` / `openai-responses` / `anthropic` |
|
||||
| `models` | 参与并行审查的模型名 |
|
||||
|
||||
Reference in new issue
Block a user