allow proxy auto model selection
This commit is contained in:
+6
-5
@@ -37,7 +37,7 @@ const WORKSPACE = process.env.GITHUB_WORKSPACE || '/workspace';
|
||||
* - Step3 自動提交檢查:偵測上輪 bot `[failure]`(exit 1)或本次為 bot 自動提交(exit 0 跳過)。
|
||||
* - Step4 PR 對話收斂:關閉未解決 comment 並將 finding 分流為已修復 / 誤報 / 仍成立(失敗則降級繼續)。
|
||||
* - Step5 角色分析:載入角色、取 PR diff,平行產生 findings 並補齊缺漏行號;
|
||||
* 未設定 API Key 或取 diff 失敗 exit 1,diff 為空 exit 0。
|
||||
* 未設定 CLIProxyAPI 或取 diff 失敗 exit 1,diff 為空 exit 0。
|
||||
* - Step6 合併去重:舊 findings + 對話收斂結果 + 新 findings → 語意去重並排序。
|
||||
* - Step7 過濾:套用排除規則 + 防守方 AI 誤報裁決。
|
||||
* - Step8 發布:寫入 findings、組裝使用量,發布 Gitea Review(失敗則降級繼續)。
|
||||
@@ -119,9 +119,10 @@ export async function main() {
|
||||
section('Pipeline 結束');
|
||||
process.exit(0);
|
||||
}
|
||||
input(`LLM=${provider}/${model};角色=[${roles.map(r => r.name).join(', ')}];diff=${diff.length} 字元`);
|
||||
const modelLabel = model || 'auto';
|
||||
input(`LLM=${provider}/${modelLabel};角色=[${roles.map(r => r.name).join(', ')}];diff=${diff.length} 字元`);
|
||||
try {
|
||||
await postComment(getRoleIntro(roles) + `\n\n> 🔍 服務:${provider} 模型:${model}`);
|
||||
await postComment(getRoleIntro(roles) + `\n\n> 🔍 服務:${provider} 模型:${modelLabel}`);
|
||||
line('角色介紹 comment 已發布');
|
||||
} catch (e) {
|
||||
warn(`角色介紹 comment 發布失敗(繼續執行): ${e.message}`);
|
||||
@@ -191,9 +192,9 @@ export async function main() {
|
||||
const runUsage = getRunUsage();
|
||||
const quota = await fetchAccountQuota(provider, { apiKeys, baseURL });
|
||||
const rate = getRateLimit();
|
||||
const usageSection = formatUsageStats(provider, model, runUsage, quota, rate);
|
||||
const usageSection = formatUsageStats(provider, modelLabel, runUsage, quota, rate);
|
||||
input(`findings ${filtered.length} 筆(${formatFindingsStatsLine(filtered)})`);
|
||||
line(`使用量: ${formatUsageStatsLine(provider, model, runUsage, quota, rate)}`);
|
||||
line(`使用量: ${formatUsageStatsLine(provider, modelLabel, runUsage, quota, rate)}`);
|
||||
try {
|
||||
await postFindingsReview(filtered, { summaryFindings: filtered, commentFindings: filtered, usageSection });
|
||||
output('Gitea Review 已發布');
|
||||
|
||||
Reference in New Issue
Block a user