/
Configure another AI Provider for AI Review Assistant

Configure another AI Provider for AI Review Assistant

This page describes how to configure a generic AI Provider for use with the AI Review Assistant.

If you are using ChatGPT, Claude.ai or Ollama, you can directly consult our dedicated guides.

If any of the headers, body content or query parameters require a secret, use the $API_SECRET placeholder, and fill the actual value in the API Key section.

As a repository administrator, follow these steps:

  1. Go the Code Review Assistant repository settings

  2. Make sure you are in the AI Review Assistant tab on top

  3. In the API URL section, enter the REST API address for your AI Provider. This has to be the endpoint for a chat (message based) completion

  4. In the Headers section, add all the key-value Http Headers for your AI Provider. For example, a Basic Authorization or a version controlling header.

  5. In the Query Parameters section, add all key-value pairs.

  6. In the Request Body section, add all members for the JSON content. For example, the model, a stop sequence, a maximum number of tokens…

  7. In the API Key section, fill in the API secret from your AI Provider. Use the $API_SECRET placeholder in the configuration to use it.

  8. In the Response Mapping JQL section, enter the JQL (JSON Query Language) query to retrieve the content of the chat message completion. For example, if the JSON response from the API is

    { "content": [ { "text": "Hi! My name is Claude.", "type": "text" } ] }

    Then the query will be content[0].text

  9. Similar to the Response Mapping JQL, in the Response Error Mapping JQL section, enter the query to retrieve the error message when an error occur. This is not strictly necessary, but it will help users when an error pops up.

  10. Click on the “Test” button. Check that you get the validation that everything is configured properly.

  11. Click “Save” to save your configuration.

 

If you have trouble in configuring our AI Review Assistant, we are happy to help! 🎉