-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy path.env.example
More file actions
92 lines (86 loc) · 4.16 KB
/
Copy path.env.example
File metadata and controls
92 lines (86 loc) · 4.16 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
91
92
# --- GitHub App ---
# Numeric App ID from the GitHub App settings page.
GITHUB_APP_ID=123456
# Either inline PEM (with literal \n) or path to the private-key file.
GITHUB_PRIVATE_KEY_PATH=./private-key.pem
# GITHUB_PRIVATE_KEY="-----BEGIN RSA PRIVATE KEY-----\n...\n-----END RSA PRIVATE KEY-----\n"
# Webhook secret configured in the GitHub App settings.
GITHUB_WEBHOOK_SECRET=change-me
# --- LLM (any OpenAI-compatible service; base URL may include /v1 or not) ---
# Examples:
# OpenAI: https://api.openai.com or https://api.openai.com/v1
# HF Router: https://router.huggingface.co or https://router.huggingface.co/v1
# vLLM / local: http://localhost:8000 or http://localhost:8000/v1
# Anthropic compat: https://api.anthropic.com or https://api.anthropic.com/v1
LLM_API_BASE=https://api.openai.com/v1
LLM_API_KEY=sk-...
# Optional. If omitted, the first model returned by {LLM_API_BASE}/v1/models
# (or {LLM_API_BASE}/models when the base already ends in /v1) is used.
# LLM_MODEL=gpt-4o
# Optional. Org slug sent as X-HF-Bill-To. Required when using a Hugging Face
# token whose Inference Providers permission is scoped to an org, not the user.
# LLM_BILL_TO=huggingface
# Optional. Max completion tokens requested from the LLM. Bump for reasoning
# models (e.g. Kimi-K2) that spend tokens on reasoning before emitting JSON.
# LLM_MAX_TOKENS=4096
# Optional. "true" to consume the chat-completion response as a streaming SSE
# feed. Useful when proxies drop long non-streaming connections.
# LLM_STREAM=false
# --- Review behaviour ---
# Phrase that must appear in a PR/issue comment to trigger a review.
MENTION_TRIGGER=@askserge
# One of COMMENT | REQUEST_CHANGES | APPROVE
REVIEW_EVENT=COMMENT
# Hard cap on diff size sent to the LLM (characters).
MAX_DIFF_CHARS=200000
# Path in the target repo to load repo-specific review rules from (default branch).
REVIEW_RULES_PATH=.ai/review-rules.md
# Fallback rules used when the repo does not ship REVIEW_RULES_PATH.
DEFAULT_REVIEW_RULES=Apply general Python correctness and security standards.
# --- Server ---
PORT=8080
LOG_LEVEL=INFO
# --- Interactive web app (reviewbot-web) ---
# Required in web mode unless DEV_NO_AUTH=1.
GITHUB_OAUTH_CLIENT_ID=Iv1.xxxxx
GITHUB_OAUTH_CLIENT_SECRET=change-me
GITHUB_OAUTH_CALLBACK_URL=http://localhost:8080/auth/callback
WEB_SESSION_SECRET=change-me
WEB_ALLOWED_USERS=octocat,hubot
# or WEB_ALLOWED_ORG=acme,other-org
# WEB_JOB_TTL_SECONDS=3600
# DEV_NO_AUTH=1
# Public URL of the GitHub App that posts reviews; linked from /help so
# users can install it on their repos in one click. Defaults to the
# Hugging Face Serge App; override for a different deployment.
# WEB_GITHUB_APP_URL=https://github.com/apps/sergereview
# --- Clone cache (web mode) ---
# Each review checks out the PR head via a shared per-repo bare clone +
# a cheap git worktree, so N concurrent reviews on one repo cost a single
# fetch instead of N cold clones. Point this at a dedicated volume in
# production (e.g. /var/lib/reviewbot/clones). Defaults to a dir under the
# system temp dir.
# WEB_CLONE_CACHE_DIR=/var/lib/reviewbot/clones
# Drop a bare repo that hasn't been used in this many seconds (default 7d).
# WEB_CLONE_CACHE_TTL_SECONDS=604800
# Shallow-fetch depth of the PR head.
# WEB_CLONE_DEPTH=50
# --- Context compression (optional; headroom-ai) ---
# Compress token-heavy context (tool outputs, older turns) before each LLM
# call. Opt-in: install the extra with `pip install '.[headroom]'`. No-op if
# the package is missing or a compression call fails.
# HEADROOM_COMPRESS=false
# Keep-ratio for text compression (e.g. 0.5 keeps ~50%). Empty = let headroom decide.
# HEADROOM_TARGET_RATIO=
# "true" to also compress user messages (the annotated diff). Off keeps cited lines intact.
# HEADROOM_COMPRESS_USER_MESSAGES=false
# "false" to leave system messages uncompressed.
# HEADROOM_COMPRESS_SYSTEM_MESSAGES=true
# Number of most-recent messages never compressed.
# HEADROOM_PROTECT_RECENT=4
# Skip compressing messages shorter than this many tokens.
# HEADROOM_MIN_TOKENS=250
# Kompress model id for ML compression, or "disabled" to skip it.
# HEADROOM_KOMPRESS_MODEL=
# Model context window (tokens) used for sizing.
# HEADROOM_MODEL_LIMIT=200000