PatchPatrol

Advanced Configuration

Intentional operator-tuning controls and explicit compatibility/legacy boundaries.

Advanced Configuration

Use this page when teams need more granular control than the baseline configuration page.

Source of truth: these settings are implemented in patchpatrol/config.py and intentionally placed here when they are advanced, high-impact, or compatibility-only.

Stable Advanced Controls

These settings are part of the shipped code path and safe to use intentionally, but they are separated from the baseline contract so teams can make changes with intent.

VariableDefaultSupported values or posturePublic meaning
AI_REVIEW_TEMPERATURE0.20 < value <= 2Controls model sampling temperature.
AI_REVIEW_TOP_P0.90 < value <= 1Controls nucleus sampling aggressiveness.
AI_REVIEW_NUM_CTXunsetPositive integer, Ollama-onlySets model context window for Ollama; rejected when AI_REVIEW_PROVIDER=openai.
AI_REVIEW_INCLUDE_GLOBSunsetComma-separated glob listInclude-filter allowlist for changed files before chunk planning.
AI_REVIEW_EXCLUDE_GLOBSunsetComma-separated glob listExclude-filter blocklist for changed files before chunk planning.
AI_REVIEW_ENABLE_PERFORMANCE_DIAGNOSTICSfalsetrue or falseEmits extra runtime diagnostics in meta.performance_diagnostics and adds a markdown diagnostics section.
AI_REVIEW_CLEANUP_OWNED_MR_DISCUSSIONSfalsetrue or falseEnables opt-in cleanup of unresolved PatchPatrol-owned inline discussions before reposting feedback.
AI_REVIEW_CODE_QUALITY_EXPORTtruetrue or falseControls export of gl-code-quality-report.json where applicable.

Performance diagnostics

AI_REVIEW_ENABLE_PERFORMANCE_DIAGNOSTICS=true is the supported way to inspect runtime behavior. It adds meta.performance_diagnostics to ai-review.json and renders a diagnostics section in human reports. Use Generation tok/s for Ollama decode speed, Prompt tok/s for prompt ingestion, Load time (s) for cold-load cost, and Overhead (s) for Docker/network/wrapper overhead. Wall total tok/s is blended prompt-plus-completion throughput and is not a generation-speed benchmark.

Provider-native prompt/generation rates may render as n/a when an OpenAI-compatible endpoint exposes token counts but not comparable timing fields. Do not log raw prompts, completions, diffs, API keys, GitLab tokens, or provider payloads for performance debugging; use artifact metadata instead. See Artifacts Schema for exact fields and Troubleshooting for interpretation.

Compatibility and Legacy Controls

  • AI_REVIEW_POST_MR_NOTE is a legacy alias preserved for backwards compatibility.
    • It is equivalent to AI_REVIEW_FEEDBACK_MODE=mr when the explicit feedback mode is not set.
    • New deployments should prefer AI_REVIEW_FEEDBACK_MODE.
  • OLLAMA_TIMEOUT_SECONDS remains available as a backwards-compatible timeout alias for the Ollama path.
    • AI_REVIEW_TIMEOUT_SECONDS takes precedence when both are set.

What is intentionally not public

  • Internal defaults and implementation details beyond this page are intentionally outside the public contract.
  • Any undocumented environment variable in these docs is treated as unsupported as a stable public guarantee, even if read internally for compatibility or transient implementation reasons.

When uncertain about a control, prefer the baseline configuration reference and treat absence from docs as intentional.

Return to Reference.

On this page