Configuration

Configuration

The .ai-review.yml (or .ai-review.json) file at the root of your repo controls reviewer behavior. All fields are optional — omit any field to use the default.

Run npx @giolabsuy/ai-code-reviewer init to generate a pre-filled config file.

Full reference

# LLM provider: openai | anthropic | gemini | ollama
provider: openai
 
# Provider model. See Providers page for options per provider.
model: gpt-4o-mini
 
# Review language: es | en
language: es
 
# Tech stack. Omit to auto-detect from package.json
# tech: nestjs
 
# Monorepo: subdirectory (or list of subdirectories) where a subproject's
# package.json/pubspec.yaml/composer.json lives. See Tech Stacks > Monorepos.
# appDir: apps/web
# appDir: [apps/web, apps/api]
 
# Cap on distinct stack groups reviewed with their own LLM call per PR
# (only relevant when appDir is a list).
maxStackGroups: 4
 
# Additional custom rules (markdown). Appended to the system prompt.
# rules: ./code-review-rules.md
 
# File globs to ignore
ignore:
  - node_modules/**
  - dist/**
  - "*.lock"
  - "*.min.js"
 
# Minimum severity to include in output: critical | major | minor | info | nitpick
minSeverity: minor
 
# Maximum patch size per file (bytes). Files larger than this are skipped.
maxFileSize: 100000
 
# Enabled check categories
checks:
  security: true
  performance: true
  maintainability: true
  testing: true
  documentation: false
  style: false
  bug-risk: true
  architecture: true
 
# Posting behavior
inlineComments: true
summaryComment: true
maxInlineComments: 20
 
# Ollama service URL (only relevant when provider: ollama)
# ollamaUrl: http://localhost:11434
 
# Extra instructions appended to the system prompt
customInstructions: |
  This project follows Clean Architecture. Any import from the domain
  layer into infrastructure is a 'major' finding.
 
# Inline comment feedback feature (opt-in)
# Enables @botai approved | review | resolved commands in inline threads
feedback:
  enabled: true
 
# Auto-approve when model recommends approve with no blocking findings (opt-in)
autoApprove:
  enabled: true
  minScore: 7
 
# Persistent cross-PR Learnings (opt-in, requires contents: write on the workflow)
learnings:
  enabled: true
  maxChars: 4000

Field reference

provider

Which LLM provider to use. See Providers for setup instructions per provider.

Default: openai | Options: openai | anthropic | gemini | ollama

model

The model name for the selected provider. Any model available on the provider's API is valid.

Default: gpt-4o-mini (when provider: openai)

language

Language the reviewer uses for finding descriptions and the PR summary.

Default: es | Options: es | en

tech

Force a specific tech stack instead of auto-detecting.

Default: auto-detected | Options: nestjs | nextjs | react | typescript | node | flutter | laravel | generic

appDir

Subdirectory (or list of subdirectories) where a subproject's package.json/pubspec.yaml/composer.json lives, for monorepos where the app isn't at the repo root. A list enables multi-stack review — see Tech Stacks > Monorepos.

Default: unset (detect at repo root) | Type: string | string[]

maxStackGroups

Cap on the number of distinct tech-stack groups reviewed with their own LLM call per PR. Only relevant when appDir is a list. Extra groups (smallest by changed-file count) are folded into the fallback/root group.

Default: 4

rules

Path to a custom rules Markdown file relative to the repo root. Appended to the system prompt after the built-in template.

ignore

Array of glob patterns for files to exclude from review.

Default: ["node_modules/**", "dist/**", "*.lock", "*.min.js"]

minSeverity

Only findings at this severity or higher are included in the output.

Default: minor | Order: criticalmajorminorinfonitpick

maxFileSize

Files with a patch larger than this number of bytes are skipped.

Default: 100000 (100 KB)

checks

Toggle individual check categories on or off.

CategoryDefaultDescription
securitytrueAuth, injection, secrets, XSS
performancetrueN+1 queries, blocking ops, unnecessary renders
maintainabilitytrueComplexity, naming, duplication
testingtrueMissing tests, bad mocking, vague assertions
documentationfalseMissing docstrings, comments
stylefalseFormatting, whitespace
bug-risktrueNull safety, race conditions, off-by-one
architecturetrueLayer violations, coupling

inlineComments

Post findings as inline comments on the PR diff.

Default: true

maxInlineComments

Cap on the number of inline comments per review. Additional findings go to the summary body.

Default: 20

ollamaUrl

The base URL for the Ollama service. Only used when provider: ollama.

Default: http://localhost:11434

customInstructions

Free-form text appended verbatim to the system prompt after all other rules. Highest priority — wins over built-in templates and rules file.

feedback.enabled

Enable @botai commands in inline PR comment threads. Requires the handle-feedback workflow job. See Inline Feedback.

Default: false

autoApprove.enabled

When the model recommends approve and there are no critical or major findings, the bot posts a real GitHub APPROVE event. See Auto-Approve.

Default: false

autoApprove.minScore

Minimum overallScore (0–10) required to auto-approve. If the score is below this threshold, the bot falls back to COMMENT. Ignored when overallScore is absent from the model response.

Default: 7

learnings

Persistent cross-PR memory. Rules captured via @botai learn or auto-captured from @botai dismiss are committed to .ai-review-learnings.md on the PR's base branch and injected into every future review of that branch — unlike suppressedFingerprints, which stays scoped to one PR. Requires the handle-feedback workflow job with contents: write (not just pull-requests: write). See Inline Feedback.

learnings:
  enabled: true
  maxChars: 4000

Default: disabled (unset)

learnings.maxChars

Max characters of learnings text injected into the system prompt. Past this limit, the oldest entries are dropped first (FIFO) — the file itself is never truncated below one entry.

Default: 4000