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
@@ -27,25 +27,34 @@ Allowlists / Gitea-on-github.com limitations: [`docs/remote-uses.md`](docs/remot
|
||||
## Providers YAML
|
||||
|
||||
```yaml
|
||||
language: zh-CN # report language: zh-CN | en | … (prompts + published comments)
|
||||
|
||||
providers:
|
||||
openrouter: # only include providers you configure
|
||||
key: OPENROUTER_API_KEY # free-form secret/env name — pick any
|
||||
protocol: openai # openai | openai-completions | openai-responses | anthropic
|
||||
# base_url: optional (defaults exist for openrouter / anthropic / openai)
|
||||
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
|
||||
```
|
||||
|
||||
| Field | Meaning |
|
||||
| --- | --- |
|
||||
| `language` | Report language for model prose + summary/inline comments (`zh-CN`, `en`, …). Alias: `report_language`. |
|
||||
| `key` | **Free-form** name of the GitHub secret / env var holding the API key. **No** required `gatekeep_` prefix. |
|
||||
| `protocol` | `openai` \| `openai-completions` \| `openai-responses` \| `anthropic` |
|
||||
| `models` | Names to use (validated against the provider’s model list API at runtime) |
|
||||
| `base_url` | Optional; known provider ids get defaults |
|
||||
|
||||
### Report language
|
||||
|
||||
- **This repo’s defaults:** `language: zh-CN` in `defaults/providers.yaml`.
|
||||
- **Override without editing YAML:** Action input `language: en` (or `zh-CN`).
|
||||
- Resolution order: Action input `language` → YAML `language` / `report_language` → `en`.
|
||||
- JSON field names and enums stay English; human-facing prose follows the configured language.
|
||||
|
||||
Mix providers in one review by listing several entries. Secrets are read from the **workflow step `env`** using each entry’s `key` name.
|
||||
|
||||
Example suggestion only (still free-form): `key: gatekeep_openrouter` is fine if you named your secret that — not required.
|
||||
|
||||
Reference in new issue
Block a user