From 230988732923893c85a359d6879d5ff66e5704fa Mon Sep 17 00:00:00 2001 From: Ben Date: Fri, 2 Jan 2026 01:09:48 +0000 Subject: [PATCH] fix: map REVIEW_MAX_COMMENTS to both inline and context limits REVIEW_MAX_COMMENTS was only mapped to REVIEW__MAX_INLINE_COMMENTS which only limits comments per-file. Added REVIEW__MAX_CONTEXT_COMMENTS mapping to also limit total comments per MR, which is what users expected. Also added missing LLM__META__TEMPERATURE env var mapping. --- README.md | 2 +- compose.yaml | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a5603b1..46cadd2 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ Create a `.env` file with the following variables: | `GITEA_TOKEN` | **Yes** | A Gitea Access Token. Required permissions: `repository` (Read), `issue` (Read and Write). | | | `GITEA_API_URL` | **Yes** | Full URL to your Gitea API (e.g., `https://git.example.com/api/v1`). | | | `PORT` | No | Host port to expose the webhook server on. | `3000` | -| `REVIEW_MAX_COMMENTS` | No | Maximum number of inline comments per review. Set to `0` to disable. | `3` | +| `REVIEW_MAX_COMMENTS` | No | Maximum number of AI comments (per-file for inline, total for context review). Set to `0` to disable. | `3` | | `OPENAI_API_KEY` | **Yes** | API Key for your LLM provider. Use `dummy` for local models if no auth needed. | | | `OPENAI_BASE_URL` | No | Base URL for the LLM API. Set this for Ollama/vLLM (e.g. `http://host.docker.internal:11434/v1/`). | `https://api.openai.com/v1/` | | `LLM_MODEL` | No | The model name to request (e.g. `gpt-4o`, `llama3.1`). | `gpt-4o` | diff --git a/compose.yaml b/compose.yaml index ca0857b..ef30220 100644 --- a/compose.yaml +++ b/compose.yaml @@ -11,6 +11,7 @@ services: # LLM Configuration - LLM__PROVIDER=${LLM_PROVIDER:-OPENAI} - LLM__META__MODEL=${LLM_MODEL:-gpt-4o} + - LLM__META__TEMPERATURE=${LLM_TEMPERATURE:-0.2} # OpenAI / Compatible API Config - LLM__HTTP_CLIENT__API_TOKEN=${OPENAI_API_KEY} - LLM__HTTP_CLIENT__API_URL=${OPENAI_BASE_URL:-https://api.openai.com/v1/} @@ -18,8 +19,9 @@ services: - VCS__PROVIDER=GITEA - VCS__HTTP_CLIENT__API_TOKEN=${GITEA_TOKEN} - VCS__HTTP_CLIENT__API_URL=${GITEA_API_URL} - # Review Config + # Review Config (max comments applies to both inline per-file and context per-MR) - REVIEW__MAX_INLINE_COMMENTS=${REVIEW_MAX_COMMENTS:-3} + - REVIEW__MAX_CONTEXT_COMMENTS=${REVIEW_MAX_COMMENTS:-3} volumes: - xai-cache:/root/.cache