huggingface/Serge

Review pull requests with any OpenAI-compatible LLM and post inline comments on the diff.

View on GitHub

Trust Signals

Scorecard Score
not yet scored
Maintenance Recency
Stale
License
None
namedescriptionrequireddefault
llm_api_keyBearer token for the chat-completion endpoint.yes
llm_api_baseBase URL of an OpenAI-compatible service. Accepts either https://host or https://host/v1.nohttps://api.openai.com/v1
llm_modelModel identifier to pass in the chat-completion request. If omitted, the action auto-discovers the first model from {llm_api_base}/models.no
llm_bill_toOptional org slug for routing inference billing (sent as the X-HF-Bill-To header). Required when using a Hugging Face token whose Inference Providers permission is scoped to an organization rather than the user.no
llm_max_tokensMaximum completion tokens requested from the LLM. Bump for reasoning models (e.g. Kimi-K2) that spend tokens on reasoning before emitting JSON.no4096
llm_streamSet to "true" to consume the chat-completion response as a streaming SSE feed. Off by default; useful for endpoints/proxies that drop long-running non-streaming connections.nofalse
mention_triggerPhrase that triggers reviews. Must be the first word of the comment.no@askserge
review_eventOne of COMMENT, REQUEST_CHANGES, APPROVE (fallback if the LLM omits one).noCOMMENT
max_diff_charsMaximum diff size (characters) sent to the LLM.no200000
review_rules_pathPath to repo-specific review rules, read from the default branch.no.ai/review-rules.md
helper_tools_pathPath to a repo-specific helper-tools JSON file, read from the default branch. Helpers can expose tightly scoped CLI commands to the reviewer when a local PR checkout is available.no.ai/review-tools.json
default_review_rulesFallback rules used when the repo has no review-rules file.noApply general Python correctness and security standards.
context_script_pathPath to an executable script in the target repo that, given the PR title/body and modified-file list as JSON on stdin, prints additional context to inject into the reviewer prompt. Skipped silently if the file is missing or not executable.no.ai/context-script
context_script_timeoutSeconds to wait for the context script before giving up.no30
repo_checkout_pathPath to a local checkout of the PR head ref. When set, the reviewer exposes read-only browse tools (read_file/list_dir/grep) rooted here so the LLM can fetch context beyond the diff. Defaults to GITHUB_WORKSPACE; set to an empty string to disable tools entirely. The caller workflow is responsible for checking out the PR head ref (e.g. with `actions/checkout@v4` and `ref: refs/pull/<number>/head`) before invoking this action.no${{ github.workspace }}
tool_max_iterationsMaximum number of tool-calling rounds before forcing the model to produce a final review. Each iteration is a separate LLM call.no8
headroom_compressSet to "true" to compress context with headroom-ai before each LLM call (cuts tokens on tool outputs and older turns). Requires the headroom-ai package; install reviewbot with the [headroom] extra. No-op if the package is missing.nofalse
headroom_target_ratioOptional headroom keep-ratio for text compression (e.g. 0.5 keeps ~50%). Leave empty to let headroom decide.no
headroom_compress_user_messagesSet to "true" to also compress user messages (the annotated diff). Off by default so cited line numbers stay intact.nofalse
headroom_compress_system_messagesSet to "false" to leave system messages uncompressed. On by default.notrue
headroom_protect_recentNumber of most-recent messages never compressed.no4
headroom_min_tokensSkip compressing messages shorter than this many tokens.no250
headroom_kompress_modelKompress model id for ML compression, or "disabled" to skip it. Leave empty for the headroom default.no
headroom_model_limitModel context window (tokens) used for sizing.no200000
stagingSet to "true" to mark this as a staging deployment. Published reviews then carry a note saying they were posted from staging.nofalse
github_tokenToken with pull-requests:write. Defaults to the job token.no${{ github.token }}
python_versionPython version to set up for running the reviewer.no3.12

no outputs