Skip to content

Configuration Reference

This reference is generated from the pydantic schemas in src/lgtmaybe/core/models.py.

ReviewConfig

The user-facing configuration model. Fields map directly to .lgtmaybe.yml keys and CLI flags.

Field Type Required Default Description
api_base string / null No null Api Base
categories list[complexity / correctness / deprecation / documentation / performance / security / tests] No ['security', 'correctness', 'deprecation', 'tests', 'documentation', 'performance', 'complexity'] Categories
context_lines integer No 20 Context Lines
exclude_paths list[string] No [] Exclude Paths
include_paths list[string] No [] Include Paths
max_files integer No 50 Max Files
max_input_tokens integer No 100000 Max Input Tokens
min_severity critical / high / info / low / medium No info
model string Yes Model
num_ctx integer / null No null Num Ctx
provider anthropic / azure / bedrock / ollama / openai / openrouter / vertex Yes
reflect boolean No True Reflect
structured_output boolean No True Structured Output
temperature number No 0.0 Temperature
timeout integer / null No null Timeout

Enums

Provider

LLM backend selected by --provider. Cloud providers (bedrock, vertex, azure) use ambient credentials — azure also needs the resource endpoint (--api-base) and accepts a key as an alternative.

  • anthropic
  • azure
  • bedrock
  • ollama
  • openai
  • openrouter
  • vertex

Severity

Finding severity, ordered low to high. Use min_severity in config to suppress findings below a threshold.

  • critical
  • high
  • info
  • low
  • medium

ReviewFinding

The structured output the model must return for each inline comment. All fields are validated by pydantic before anything is posted to GitHub.

Field Type Required Default Description
body string Yes Body
line integer Yes Line
path string Yes Path
severity critical / high / info / low / medium Yes
side string No RIGHT Side
suggestion string / null No null Suggestion
title string Yes Title

ProviderResult

The normalised return value of one LLM completion, including usage and cost.

Field Type Required Default Description
input_tokens integer Yes Input Tokens
output_tokens integer Yes Output Tokens
text string Yes Text

PRContext

Everything the engine needs about a pull request. Fetched via the GitHub REST API — PR code is never checked out.

Field Type Required Default Description
base_sha string Yes Base Sha
changed_files list[string] Yes Changed Files
diff string Yes Diff
file_contents object No File Contents
head_sha string Yes Head Sha
pr_number integer Yes Pr Number
repo string Yes Repo

Raw JSON schemas

The canonical machine-readable schemas. These are the source of truth for provider output validation.

ReviewConfig

{
  "$defs": {
    "Provider": {
      "description": "The backend selected by the `--provider` flag.",
      "enum": [
        "openai",
        "openrouter",
        "anthropic",
        "bedrock",
        "vertex",
        "azure",
        "ollama"
      ],
      "title": "Provider",
      "type": "string"
    },
    "ReviewCategory": {
      "description": "A single review lens. The engine asks for each one in its own LLM call.",
      "enum": [
        "security",
        "correctness",
        "deprecation",
        "tests",
        "documentation",
        "performance",
        "complexity"
      ],
      "title": "ReviewCategory",
      "type": "string"
    },
    "Severity": {
      "description": "Finding severity, ordered low \u2192 high for `min_severity` filtering.",
      "enum": [
        "info",
        "low",
        "medium",
        "high",
        "critical"
      ],
      "title": "Severity",
      "type": "string"
    }
  },
  "additionalProperties": false,
  "description": "How to run one review: provider/model, severity floor, filters, caps.",
  "properties": {
    "api_base": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Api Base"
    },
    "categories": {
      "default": [
        "security",
        "correctness",
        "deprecation",
        "tests",
        "documentation",
        "performance",
        "complexity"
      ],
      "items": {
        "$ref": "#/$defs/ReviewCategory"
      },
      "title": "Categories",
      "type": "array"
    },
    "context_lines": {
      "default": 20,
      "title": "Context Lines",
      "type": "integer"
    },
    "exclude_paths": {
      "items": {
        "type": "string"
      },
      "title": "Exclude Paths",
      "type": "array"
    },
    "include_paths": {
      "items": {
        "type": "string"
      },
      "title": "Include Paths",
      "type": "array"
    },
    "max_files": {
      "default": 50,
      "title": "Max Files",
      "type": "integer"
    },
    "max_input_tokens": {
      "default": 100000,
      "title": "Max Input Tokens",
      "type": "integer"
    },
    "min_severity": {
      "$ref": "#/$defs/Severity",
      "default": "info"
    },
    "model": {
      "title": "Model",
      "type": "string"
    },
    "num_ctx": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Num Ctx"
    },
    "provider": {
      "$ref": "#/$defs/Provider"
    },
    "reflect": {
      "default": true,
      "title": "Reflect",
      "type": "boolean"
    },
    "structured_output": {
      "default": true,
      "title": "Structured Output",
      "type": "boolean"
    },
    "temperature": {
      "default": 0.0,
      "title": "Temperature",
      "type": "number"
    },
    "timeout": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Timeout"
    }
  },
  "required": [
    "provider",
    "model"
  ],
  "title": "ReviewConfig",
  "type": "object"
}

ReviewFinding

{
  "$defs": {
    "Severity": {
      "description": "Finding severity, ordered low \u2192 high for `min_severity` filtering.",
      "enum": [
        "info",
        "low",
        "medium",
        "high",
        "critical"
      ],
      "title": "Severity",
      "type": "string"
    }
  },
  "additionalProperties": false,
  "description": "A single inline review comment the model wants to post.",
  "properties": {
    "body": {
      "title": "Body",
      "type": "string"
    },
    "line": {
      "title": "Line",
      "type": "integer"
    },
    "path": {
      "title": "Path",
      "type": "string"
    },
    "severity": {
      "$ref": "#/$defs/Severity"
    },
    "side": {
      "default": "RIGHT",
      "enum": [
        "LEFT",
        "RIGHT"
      ],
      "title": "Side",
      "type": "string"
    },
    "suggestion": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Suggestion"
    },
    "title": {
      "title": "Title",
      "type": "string"
    }
  },
  "required": [
    "path",
    "line",
    "severity",
    "title",
    "body"
  ],
  "title": "ReviewFinding",
  "type": "object"
}

ProviderResult

{
  "additionalProperties": false,
  "description": "The normalised return of one LLM completion, with token usage.",
  "properties": {
    "input_tokens": {
      "title": "Input Tokens",
      "type": "integer"
    },
    "output_tokens": {
      "title": "Output Tokens",
      "type": "integer"
    },
    "text": {
      "title": "Text",
      "type": "string"
    }
  },
  "required": [
    "text",
    "input_tokens",
    "output_tokens"
  ],
  "title": "ProviderResult",
  "type": "object"
}

PRContext

{
  "additionalProperties": false,
  "description": "Everything the engine needs about a PR \u2014 fetched via API, never checkout.",
  "properties": {
    "base_sha": {
      "title": "Base Sha",
      "type": "string"
    },
    "changed_files": {
      "items": {
        "type": "string"
      },
      "title": "Changed Files",
      "type": "array"
    },
    "diff": {
      "title": "Diff",
      "type": "string"
    },
    "file_contents": {
      "additionalProperties": {
        "type": "string"
      },
      "title": "File Contents",
      "type": "object"
    },
    "head_sha": {
      "title": "Head Sha",
      "type": "string"
    },
    "pr_number": {
      "title": "Pr Number",
      "type": "integer"
    },
    "repo": {
      "title": "Repo",
      "type": "string"
    }
  },
  "required": [
    "diff",
    "changed_files",
    "base_sha",
    "head_sha",
    "repo",
    "pr_number"
  ],
  "title": "PRContext",
  "type": "object"
}