> ## Documentation Index
> Fetch the complete documentation index at: https://docs.coderabbit.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Check which configuration a review used

> Print the resolved configuration for a repository, read where each value came from, and find the file a past review used.

CodeRabbit can show the configuration it resolved for a repository and the file a review used. Use this guide after every configuration change, and as the first step when a setting doesn't behave as expected.

## Before you start

* You need a pull request in the repository. Anyone who can comment on it can run the command.
* Know the [configuration priority](https://docs.coderabbit.ai/configuration/resolution.md), so the source labels below make sense.

## Show the resolved configuration

1. Open a pull request in the repository.
2. Post `@coderabbitai configuration` as the entire text of a comment. The command works on every Git platform.
3. Read the reply. Its **Configuration used** line names the source mode, the repository, branch, entry file and commit CodeRabbit read, and the layers that contributed. The full resolved YAML follows in a collapsed **CodeRabbit configuration** section. A `# Source:` comment above each value names the layer that supplied it, including defaults. A list carries one comment for all of its entries, and an object with keys carries no comment of its own.

```yaml theme={null}
# Source: defaults
language: en-US
reviews:
  # Source: Repository YAML (base)
  profile: assertive
  # Source: defaults
  high_level_summary: true
```

When no configuration file from the repository applied, the **Configuration used** line says so instead of naming a file. On GitHub Cloud, a note before the YAML says that the command doesn't load [directory documents](https://docs.coderabbit.ai/configuration/documents.md).

## Read the source labels

Each `# Source:` comment uses one of these labels.

| Label in the output | Layer | Notes |
| - | - | - |
| Repository YAML | The repository's configuration file | For a TypeScript file, see the note below. |
| Central YAML | The file in the central `coderabbit` repository | |
| Environment YAML | The `YAML_CONFIG` variable | Self-hosted CodeRabbit only. |
| Repository UI | Repository settings in the web interface | The web interface calls this layer **Repository settings**. |
| Organization UI | Organization defaults in the web interface | |
| Workspace UI | Workspace settings in the web interface | |
| workspace defaults | Values filled in by **Use workspace settings as defaults** | |
| Organization global overrides, Workspace global overrides | Global overrides | Win over every layer. |
| defaults | Schema defaults | Lowercase in the output. |

With inheritance on, a layer label ends in `(base)` for the layer that started the walk or `(inherited)` for a parent merged into it. For example, `Repository YAML (base)` followed by `Organization UI (inherited)` means the repository file inherits from the organization's saved settings.

> [!NOTE]
>
> The output doesn't label TypeScript files separately. A value that comes from a specific file in a TypeScript configuration carries that file's name as its label. Everything else shows `Repository YAML (base)` or `Central YAML (base)`. Only the **Layers** line says `Repository TS config` or `Central TS config`.

## Find the file a review used

Each review records the file it read. Open the review's **Review info** section on the pull request and expand **Run configuration**.

| Field | What it shows |
| - | - |
| **Source mode** | `Auto`, `Default branch`, `Trusted PR override` or `Custom`. A fallback reads `Auto (fallback from Default branch)` or `Auto (fallback from Custom)`. |
| **Repository** and **Branch** | Where CodeRabbit read the file. |
| **File** and **Commit** | The file and the commit it was read at. |
| **Layers** | Which layers contributed. `Path: <file>` or `Repository: <central repository>/<file>` appears only when no inheritance happened. With inheritance, the line lists labels such as `Repository YAML (base), Organization UI (inherited)`. |

The selected file alone doesn't show values that inheritance or global overrides supplied. Run `@coderabbitai configuration` to see what those layers supply now. Values can differ from what a past review used. To change which branch a repository reads, see [Choose the configuration branch](https://docs.coderabbit.ai/configuration/branch.md).

## Read the output with its limits in mind

* The command shows the configuration resolved at the moment you post it. A past review used the configuration recorded in its own **Run configuration**.
* The resolved YAML uses the setting names used at run time. With schema V3, the reply says the YAML is an internal V2 runtime format and not a file to copy.
* The output doesn't prove that [directory documents](https://docs.coderabbit.ai/configuration/documents.md) loaded during a review.

## Read the configuration through the API

Call the effective-configuration operation to read the repository's current configuration without a pull request. It takes only a repository ID, so it doesn't show a configuration that a pull request's own branch changes. It returns the resolved YAML and a `layers` array with each layer's source and YAML. When CodeRabbit can't resolve the configuration, it returns `complete: false` with a reason. The key needs the `configuration:read` scope.

```bash theme={null}
curl "https://api.coderabbit.ai/v1/repositories/$REPOSITORY_ID/configuration/effective" \
  --header "x-coderabbitai-api-key: $CODERABBIT_API_KEY"
```

See [Read effective repository configuration](https://docs.coderabbit.ai/api/reference/get-effective-repository-configuration.md) for the response, and [Automate configuration](https://docs.coderabbit.ai/configuration/guides/automate.md) for the related operations.

## Check the result

Confirm that the value you changed shows the label you expect. A value from the layer you edited means the change applies. A different label means another layer outranks it. If so, continue with [Fix settings that aren't applied](https://docs.coderabbit.ai/configuration/guides/troubleshoot.md).

## What's next

> [card] [Fix settings that aren't applied](https://docs.coderabbit.ai/configuration/guides/troubleshoot.md)
>
> Match a symptom to its cause and fix it.

> [card] [How CodeRabbit resolves configuration](https://docs.coderabbit.ai/configuration/resolution.md)
>
> See the order in which CodeRabbit combines layers.

> [card] [Automate configuration](https://docs.coderabbit.ai/configuration/guides/automate.md)
>
> Read, preview, and change configuration with the API, MCP, and CLI.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.