Repository navigation
Expand file tree
/
Copy pathconfig.yaml
More file actions
90 lines (76 loc) · 3.7 KB
/
Copy pathconfig.yaml
File metadata and controls
90 lines (76 loc) · 3.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
# AI Code Review Agent Configuration Example
# Copy this file to config.yaml and customize as needed
llm:
# 一键切换模型:修改 provider 字段即可
# - "deepseek" → 使用 DeepSeek (默认)
# - "zhipuai" → 使用 ZhipuAI (GLM-4)
# - "openai" → 使用 OpenAI
# - "dashscope" → 使用阿里云 DashScope (Qwen)
provider: "deepseek" # Options: "openai", "deepseek", "zhipuai"
# 模型名称(根据 provider 自动选择默认值)
# DeepSeek: "deepseek-chat"
# ZhipuAI: "glm-4.6"
# OpenAI: "gpt-4", "gpt-3.5-turbo" 等
# OpenRouter: "deepseek/deepseek-chat-v3-0324:free", "anthropic/claude-3.5-sonnet" 等
model: "deepseek-chat"
# API Key (可选,可通过环境变量设置)
# 环境变量优先级: LLM_API_KEY > provider-specific keys (DEEPSEEK_API_KEY, ZHIPUAI_API_KEY)
api_key: null # 填入你的 OpenRouter API key,或通过 LLM_API_KEY 环境变量设置
# Base URL (仅用于 OpenAI 兼容的 API,如 DeepSeek / OpenRouter)
# ZhipuAI 不需要此配置
base_url: "https://api.deepseek.com"
# Temperature 参数 (0.0 - 2.0)
temperature: 0
# 快速切换示例:
# 切换到 ZhipuAI: 将 provider 改为 "zhipuai",model 改为 "glm-4"
# 切换到 OpenAI: 将 provider 改为 "openai",model 改为 "gpt-4"
#
# 环境变量覆盖(最高优先级):
# export LLM_PROVIDER=zhipuai # 覆盖配置文件中的 provider
# export LLM_MODEL=glm-4 # 覆盖配置文件中的 model
# export LLM_API_KEY=your-key # 覆盖配置文件中的 api_key
# export DASHSCOPE_API_KEY=your-key # DashScope 专用 key(provider=dashscope 时读取)
system:
workspace_root: "." # Root directory of the workspace
assets_dir: "assets_cache" # Directory for storing built assets
timeout_seconds: 600 # Maximum time for analysis (10 minutes)
max_concurrent_llm_requests: 2
max_expert_rounds: 22 # Maximum rounds for expert analysis (circuit breaker)
max_expert_tool_calls: 20
# ===== Noise control: file path filtering =====
# 默认启用内置排除(锁文件/生成物/二进制/媒体/日志等),可用 include/exclude 进行覆盖
path_filter_enabled: true
path_filter_include_globs: [] # 例如 ["**/*.svg"] 强制把 svg 纳入审查
path_filter_exclude_globs: [] # 例如 ["**/vendor/**"] 额外排除
# ===== Reporter threshold =====
confidence_threshold: 0.6
# 可选:按风险类型设置更严格阈值(例如降低 Robustness 误报)
# confidence_threshold_by_risk_type:
# Robustness_Boundary_Conditions: 0.75
# ===== Manager gating / budgeting =====
manager_anchor_window: 5 # 仅保留落在变更行±N 的风险
manager_drop_unanchored: true
manager_unanchored_confidence: 0.2
manager_max_work_items_total: 15
manager_max_items_per_file: 3
# 建议:对 Robustness 做小配额,优先留给 Concurrency/Authorization/Lifecycle
manager_max_items_per_risk_type:
Robustness_Boundary_Conditions: 4
Concurrency_Timing_Correctness: 4
Authorization_Data_Exposure: 3
Lifecycle_State_Consistency: 3
Intent_Semantic_Consistency: 2
Syntax_Static_Errors: 10
manager_risk_type_weights: {} # 为空则使用内置默认(降低 Robustness 权重)
manager_severity_weights: {} # 为空则使用内置默认(error>warning>info)
manager_merge_line_window: 5
manager_merge_jaccard: 0.75
# ===== Expert calibration =====
expert_confidence_clamp_on_budget_stop: 0.55
# ===== Harness: Verify Loop =====
harness_verify_loop_enabled: true
harness_verify_confidence_floor: 0.3
# ===== Harness: Eval Gate =====
harness_eval_gate_enabled: true
# ===== Harness: Progressive Context =====
harness_progressive_context_enabled: true