LLM connectors and models
AI Code Review calls a large language model through Harness. You can bring your own model provider, or use the Harness AI gateway.
Supported providers and models
| Provider | Models | Notes |
|---|---|---|
| Anthropic | Any Anthropic model, including Sonnet, Opus, and Fable | Opus is recommended for review quality |
| Anthropic on Amazon Bedrock | Any Anthropic model available in your Bedrock account | Use this when your account requires models to stay inside AWS |
Anthropic is the only provider supported at beta. Bring your own key, or use the Harness AI gateway.
Model choice is a real trade. Review quality on a large diff depends heavily on the model, which is why Opus is recommended even though smaller models cost less per run. Start with the recommendation and change it once you have seen the findings on your own pull requests.
How the agent reaches a model
Model access is granted during onboarding rather than configured per review. Two things make it work:
- The AI Code Review service account is bound to the built-in
_llm_gateway_userrole at account scope, against all resources including child scopes. - The generated review pipeline declares
ai_llm_gateway: accesson its stage.
A repository onboarded successfully can run reviews without any further model configuration.
Go to What Harness creates to review the service account and its bindings.
Point a scope at a connector
The connector_path field on a setting names the connector the agent uses for that scope. Set it when a scope must use a specific model rather than the default.
connector_path is a plain string and is not validated when you save it. A typo is accepted and surfaces later as a failing review rather than as an error at save time.
Like the system prompt, connector_path resolves by inheritance: the nearest non-empty value wins, walking up from the repository through the space chain. It resolves independently of every other field, so a repository can take its connector from the account while taking its criteria from three levels at once.
Go to Scope and inheritance to review the resolution order.
Clearing connector_path at a lower scope does not disable inheritance, it re-enables it. The nearest ancestor value is used instead. To change the model for a scope, set a different connector rather than clearing the field.
Cost and token usage
Reviews consume model tokens on every run, billed against your account rather than per repository. A criterion that runs on every pull request in an organization runs on every pull request in that organization, so the cost of a criterion scales with where you define it.
Detailed usage reporting is not available at beta.
Related concepts
- Settings reference: Where
connector_pathsits among the other fields. - What Harness creates: The role binding that grants model access.
- What is supported: Platforms, models, and current boundaries.