> For the complete documentation index, see [llms.txt](https://docs.flosum.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.flosum.com/devops/settings/ai-settings/adding-a-custom-ai-model.md).

# Adding a Custom AI Model

{% hint style="warning" %}

#### Written for the Old UI

This article was written for the old UI. The instructions are still usable, but the screenshots are outdated. In some cases, items referenced in the instructions have moved or changed. If you cannot find an item, see the [Where Did It Go](/devops/new-ui-ux-transition/where-did-it-go.md) article.
{% endhint %}

## ![](https://1800549522-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRpUu5iMlzMFAudyBvMOl%2Fuploads%2FG5ZbxX918xOHwbAwAJ4n%2FSummary2-Small-Icon.svg?alt=media\&token=da26a67f-ff7f-47b3-8669-06be960dc2d7) Overview

This article explains how to connect a custom AI model to DevOps, replacing Flosum’s shared AI resources. Using your own model can improve performance, reduce latency, and help prevent temporary errors caused by heavy load on Flosum's shared AI resources. A self-hosted model can also provide stronger information security than cloud AI providers. Depending on the provider and model you choose, you may see improvements in speed and reliability. To connect, you will need an API token from your chosen provider. To learn more about the AI features in DevOps, see the following article.

* [Overview of AI Features](/devops/settings/ai-settings/overview-of-ai-features.md)

{% hint style="info" %}

#### Best Practices

* Validate your custom AI model configuration in a non-production branch before rolling it out more widely.
* Use an AI model provider API endpoint that meets your security requirements (cloud vs self-hosted).
* Store your API token securely and rotate it based on your security requirements.
  {% endhint %}

### Supported AI Models

* DeepSeek Chat
* DeepSeek Reasoner
* GPT 4o
* GPT 4o Mini
* GPT 4.1
* GPT 4.1 Mini
* GPT 5
* GPT 5 Mini

## Adding a Custom Model

{% stepper %}
{% step %}

### Access AI Settings

1. Click **Settings** from the left sidebar menu.
2. Click the **General** tab.
3. Click **AI settings**.

   <div align="left"><figure><img src="https://1800549522-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRpUu5iMlzMFAudyBvMOl%2Fuploads%2F4ttPCgSU5HP1IPyvoqYJ%2FAddingACustomAiModel-S01-01.png?alt=media&amp;token=f69f004f-466a-4b97-9dc3-ebf029cf924c" alt="" width="563"><figcaption></figcaption></figure></div>

{% endstep %}

{% step %}

### Enable Custom Model

1. Enable the **Custom model** toggle.

   <div align="left"><figure><img src="https://1800549522-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRpUu5iMlzMFAudyBvMOl%2Fuploads%2Fofv151HeCuDIiIukdNut%2FAddingACustomAiModel-S02-01.png?alt=media&amp;token=42bcde25-985b-4d60-80d6-806305804745" alt="" width="563"><figcaption></figcaption></figure></div>
2. Click the **Model** dropdown menu.

   <div align="left"><figure><img src="https://1800549522-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRpUu5iMlzMFAudyBvMOl%2Fuploads%2FTAmUyHgwM6MVUp12MAj9%2FAddingACustomAiModel-S02-02.png?alt=media&amp;token=ae1b724c-cf90-42aa-899c-787f4906dc4a" alt="" width="563"><figcaption></figcaption></figure></div>
3. Select the AI model you are connecting to.

   <div align="left"><figure><img src="https://1800549522-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRpUu5iMlzMFAudyBvMOl%2Fuploads%2F86nH2jjAtyuBxtWRkir8%2FAddingACustomAiModel-S02-03.png?alt=media&amp;token=8c543004-9cbe-420e-a2aa-f847dc29d8df" alt="" width="563"><figcaption></figcaption></figure></div>
4. In the **Api Url** textbox, enter the endpoint URL of the AI model you are connecting to.

{% hint style="info" %}

#### API URL

**DeepSeek API Endpoint**

You can connect to a DeepSeek model hosted by DeepSeek using the following URL:

* <https://api.deepseek.com>

**OpenAI API Endpoint**

You can connect to a GPT model hosted by OpenAI using the following URL:

* <https://api.openai.com/v1>

**Third-Party or Self-Hosted API Endpoint**

You can connect to any third-party or self-hosted AI model that uses an OpenAI-compatible API endpoint. The API URL must be accessible from Flosum’s servers.
{% endhint %}

5. In the **Token** textbox, enter your API token for connecting to the AI model.

   <div align="left"><figure><img src="https://1800549522-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRpUu5iMlzMFAudyBvMOl%2Fuploads%2Fs5BINaUQSDNfQjxllgfw%2FAddingACustomAiModel-S02-04.png?alt=media&amp;token=63144fa0-4e71-4090-ba50-c4868c98632d" alt="" width="563"><figcaption></figcaption></figure></div>
6. Click **Save**.

   <div align="left"><figure><img src="https://1800549522-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRpUu5iMlzMFAudyBvMOl%2Fuploads%2FnF10iwJbDWP9zafv50mm%2FAddingACustomAiModel-S02-05.png?alt=media&amp;token=c0c93ab0-3020-40cc-bd8a-c2bec84ec09b" alt="" width="563"><figcaption></figcaption></figure></div>
7. If the connection to the AI model is successful, you will see the message "**AI model configured successfully.**"
   {% endstep %}

{% step %}

### Using AI Features

For instructions on using DevOps' AI features, see the following articles:

* AI Test Class Creator
* AI Code Documenter
  {% endstep %}
  {% endstepper %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.flosum.com/devops/settings/ai-settings/adding-a-custom-ai-model.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
