This page describes how to configure Claude AI as your AI provider for AI Review Assistant.
Follow As a repository administrator, follow these steps:
Go the Code Review Assistant repository settings
Make sure you are in the AI Review Assistant tab on top
In the API URL section, enter the REST API address for Claude AI:
https://api.anthropic.com/v1/messages
.In the Headers section, click on the “Add Header” button. Enter
x-api-key
on the left side, and$API_SECRET
on the right side.Still in the Headers section, click on the ➕ icon. Enter
anthropic-version
on the left side, and2023-06-01
on the right side. The headers configuration should look like the followingNote: the
2023-06-01
is the most up-to-date version at the time of this writing. Consult the official Claude documentation to check whether a new version is available.In the Request Body section, click on the ➕ icon. Enter
model
in the input, then click onAdd > Text
and enterclaude-3-5-sonnet-20241022
. As for the version, check the list of available models using Claude’s API.Still in the Request Body section, click on the ➕ icon. Enter
max_tokens
in the input, then click onAdd > Number
and enter, e.g.,1024
. The body configuration should look like the following
...