Skip to content

Model Inversion

Model inversion lets a different AI model family review AI authored code. For example, code attributed to Claude is reviewed by GPT, and code attributed to GPT or Codex is reviewed by Claude.

This provides a second model's perspective on the code. It helps find more bugs and issues.

Enable Model Inversion

You must be a tenant owner or admin to change this setting.

  1. Open Code Review Settings > LLM.
  2. Configure and save your preferred Code Review model.
  3. Turn on Model inversion.

The setting applies to your tenant. Turning it off restores the normal configured model unless you explicitly select a model for a particular run.

Model inversion is available only for pro and enterprise plans.

Pull Request Reviews

CloudAEye reads recognized Co-authored-by trailers in commit messages to identify AI authorship.

Examples of recognized trailers:

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Codex <codex@openai.com>

With inversion enabled:

Detected authorship Review behavior
Claude Select the configured GPT reviewer family.
GPT Select the configured Claude reviewer family.
Neither recognized Keep the normal Code Review model.

Enabling inversion alone does not force every review onto another model. If recognized authorship is absent, the usual model remains in use.

Choose a Model for One Review

For supported review commands in GitHub, GitLab, and Bitbucket, use --model and --model-provider to override automatic selection. For example, in a GitHub PR comment:

@cloudaeye /inspect --model-provider openai --model gpt-6.1-sol

--model accepts a supported family or exact model ID. --model-provider chooses the hosting provider. When only a model provider is supplied, its default LLMs are used.

An explicit model or provider takes precedence over inversion for that run. These flags do not change your saved settings. The --invert-model flag described below is for the Claude Code review commands, not PR comments.

Pre-Commit Reviews in Claude Code

Pre-commit review runs before a pull request exists. When inversion is enabled, it selects the configured GPT reviewer.

The /cloudaeye:review, /cloudaeye:inspect, and /cloudaeye:security commands use the saved inversion setting by default:

/cloudaeye:inspect

Override inversion for a single run:

/cloudaeye:inspect --invert-model false
/cloudaeye:review --invert-model true

Or select the reviewer explicitly:

/cloudaeye:security --model-provider azure --model gpt

Selection follows this order, subject to plan and configuration restrictions:

  1. An explicit --model or --model-provider takes precedence over inversion.
  2. Otherwise, --invert-model true|false overrides the saved inversion setting.
  3. With no override, the saved setting applies.

These overrides affect only the current run. They do not update the tenant configuration.

See Code Review LLM Settings, Review Code, and the MCP Usage Guide for related configuration and commands.