6 Commits

Author SHA1 Message Date
Ben
915d336b95 refactor: separate inline and context comment limits
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 39s
Split REVIEW_MAX_COMMENTS into two independent variables:
- REVIEW_MAX_COMMENTS: total comments per PR (context review)
- REVIEW_MAX_INLINE_COMMENTS: comments per file (inline review)

Addresses AI reviewer feedback for independent configuration.
2026-01-02 01:44:29 +00:00
Ben
2309887329 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.
2026-01-02 01:09:48 +00:00
Ben
2f91e0b817 Limit inline comments via REVIEW_MAX_COMMENTS
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 36s
2026-01-01 05:50:13 +00:00
Ben
16023164ac Revert to explicit GITEA_API_URL configuration
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 36s
2026-01-01 05:27:38 +00:00
Ben
59c50c4cde Refactor config to use GITEA_BASE_URL
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 37s
2026-01-01 05:23:00 +00:00
Ben
a152406475 Fix API URL slash suffix
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 36s
2026-01-01 05:20:29 +00:00
2 changed files with 8 additions and 2 deletions

View File

@@ -25,8 +25,10 @@ Create a `.env` file with the following variables:
| Variable | Required | Description | Default | | Variable | Required | Description | Default |
| :--- | :--- | :--- | :--- | | :--- | :--- | :--- | :--- |
| `GITEA_TOKEN` | **Yes** | A Gitea Access Token. Required permissions: `repository` (Read), `issue` (Read and Write). | | | `GITEA_TOKEN` | **Yes** | A Gitea Access Token. Required permissions: `repository` (Read), `issue` (Read and Write). | |
| `GITEA_API_URL` | No | Full URL to your Gitea API (e.g., `http://gitea:3000/api/v1`). | | | `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` | | `PORT` | No | Host port to expose the webhook server on. | `3000` |
| `REVIEW_MAX_COMMENTS` | No | Maximum total AI comments per PR (context review). Set to `0` to disable. | `3` |
| `REVIEW_MAX_INLINE_COMMENTS` | No | Maximum inline comments per file. 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_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/` | | `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` | | `LLM_MODEL` | No | The model name to request (e.g. `gpt-4o`, `llama3.1`). | `gpt-4o` |

View File

@@ -11,13 +11,17 @@ services:
# LLM Configuration # LLM Configuration
- LLM__PROVIDER=${LLM_PROVIDER:-OPENAI} - LLM__PROVIDER=${LLM_PROVIDER:-OPENAI}
- LLM__META__MODEL=${LLM_MODEL:-gpt-4o} - LLM__META__MODEL=${LLM_MODEL:-gpt-4o}
- LLM__META__TEMPERATURE=${LLM_TEMPERATURE:-0.2}
# OpenAI / Compatible API Config # OpenAI / Compatible API Config
- LLM__HTTP_CLIENT__API_TOKEN=${OPENAI_API_KEY} - LLM__HTTP_CLIENT__API_TOKEN=${OPENAI_API_KEY}
- LLM__HTTP_CLIENT__API_URL=${OPENAI_BASE_URL:-https://api.openai.com/v1/} - LLM__HTTP_CLIENT__API_URL=${OPENAI_BASE_URL:-https://api.openai.com/v1/}
# VCS Config # VCS Config
- VCS__PROVIDER=GITEA - VCS__PROVIDER=GITEA
- VCS__HTTP_CLIENT__API_TOKEN=${GITEA_TOKEN} - VCS__HTTP_CLIENT__API_TOKEN=${GITEA_TOKEN}
- VCS__HTTP_CLIENT__API_URL=${GITEA_API_URL:-http://gitea-server:3000/api/v1} - VCS__HTTP_CLIENT__API_URL=${GITEA_API_URL}
# Review Config (inline=per file, context=per MR total)
- REVIEW__MAX_INLINE_COMMENTS=${REVIEW_MAX_INLINE_COMMENTS:-3}
- REVIEW__MAX_CONTEXT_COMMENTS=${REVIEW_MAX_COMMENTS:-3}
volumes: volumes:
- xai-cache:/root/.cache - xai-cache:/root/.cache