best-review 0.6.2 → 0.6.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -151,11 +151,12 @@ POST <llm.baseUrl>/chat/completions
151
151
 
152
152
  ## 配置
153
153
 
154
- 配置文件位于用户根目录下的 `~/.best-review/config.json`。`best-review init` 会写入模型服务配置和基础执行器配置:
154
+ 配置文件位于用户根目录下的 `~/.best-review/config.json`;项目根目录的 `.best-review.json` 可覆盖本项目配置。`best-review init` 会写入模型服务配置和基础执行器配置:
155
155
 
156
156
  ```json
157
157
  {
158
158
  "executor": "deepseek-api",
159
+ "reviewProfile": "quality",
159
160
  "llm": {
160
161
  "platform": "deepseek",
161
162
  "baseUrl": "https://api.deepseek.com",
@@ -168,12 +169,12 @@ POST <llm.baseUrl>/chat/completions
168
169
  },
169
170
  "executors": {
170
171
  "openai-compatible-api": {
171
- "review": { "concurrency": 2 },
172
- "validation": { "timeout": 1800, "batchSize": 10, "concurrency": 1 }
172
+ "review": { "concurrency": 1 },
173
+ "validation": { "timeout": 1800, "batchSize": 8, "concurrency": 1 }
173
174
  },
174
175
  "deepseek-api": {
175
- "review": { "concurrency": 2 },
176
- "validation": { "timeout": 1800, "batchSize": 10, "concurrency": 1 }
176
+ "review": { "concurrency": 1 },
177
+ "validation": { "timeout": 1800, "batchSize": 8, "concurrency": 1 }
177
178
  }
178
179
  }
179
180
  }
@@ -182,9 +183,25 @@ POST <llm.baseUrl>/chat/completions
182
183
  配置优先级:
183
184
 
184
185
  ```text
185
- 默认值 < ~/.best-review/config.json < CLI 参数
186
+ 默认值 < ~/.best-review/config.json < .best-review.json < BEST_REVIEW_PROFILE < 细粒度环境变量 < CLI 参数
186
187
  ```
187
188
 
189
+ `reviewProfile` 用来表达 review 精细度/速度取向:
190
+
191
+ | Profile | 用途 | worker | review | validation | batchSize |
192
+ | --- | --- | ---: | ---: | ---: | ---: |
193
+ | `quality` | 本地和服务端默认,质量优先 | 1 | 1 | 1 | 8 |
194
+ | `balanced` | 可选,均衡优先 | 2 | 1 | 1 | 10 |
195
+ | `fast` | 服务端可选,速度优先 | 5 | 4 | 2 | 20 |
196
+
197
+ 服务端可用环境变量切换档位:
198
+
199
+ ```bash
200
+ BEST_REVIEW_PROFILE=fast
201
+ ```
202
+
203
+ 如需临时覆盖某个具体参数,仍可使用细粒度环境变量:`BEST_REVIEW_WORKER_CONCURRENCY`、`BEST_REVIEW_REVIEW_CONCURRENCY`、`BEST_REVIEW_VALIDATION_CONCURRENCY`、`BEST_REVIEW_VALIDATION_BATCH_SIZE`。
204
+
188
205
  可配置项包括:
189
206
 
190
207
  ```json
@@ -192,6 +209,7 @@ POST <llm.baseUrl>/chat/completions
192
209
  "extends": ["https://github.com/org/best-review-rules.git#v1.0.0"],
193
210
  "excludePatterns": ["dist/**", "coverage/**", "docs/**", "*.md"],
194
211
  "concurrency": 2,
212
+ "reviewProfile": "quality",
195
213
  "executor": "deepseek-api",
196
214
  "llm": {
197
215
  "platform": "deepseek",
@@ -205,10 +223,10 @@ POST <llm.baseUrl>/chat/completions
205
223
  },
206
224
  "executors": {
207
225
  "deepseek-api": {
208
- "review": { "concurrency": 2 },
226
+ "review": { "concurrency": 1 },
209
227
  "validation": {
210
228
  "timeout": 1800,
211
- "batchSize": 10,
229
+ "batchSize": 8,
212
230
  "concurrency": 1
213
231
  }
214
232
  }