---
title: "Set up the model connection in ARGENT"
description: "Set the Base URL and API key in Model Sources, then choose a model for each of the four uses — language, embedding, OCR and Enhance — in Model Settings"
canonical_url: "https://docs.ardge.com/en/knowledge/argent/model-connection"
---
# Set up the model connection in ARGENT

> Set the Base URL and API key in Model Sources, then choose a model for each of the four uses — language, embedding, OCR and Enhance — in Model Settings

## Overview

ARGENT has no models of its own. Answering questions, retrieval and file recognition all run on external models, which are usually deployed in AI Model Center on the same ARX device.

The **Model Connection** page has two tabs:

- **1. Model Sources**: register the services that provide models. Each source has a **Name**, a **Base URL** and an **API Key**. You can register more than one source
- **2. Model Settings**: choose one model for each of the four uses from the registered sources

Setup therefore has two parts: confirm the model sources are reachable, then choose the models to use in the model settings.

## What you'll learn

- Tell apart the four models ARGENT uses — language, embedding, OCR and Enhance — and what each one does
- Confirm in AI Model Center that the models are running
- Add or check a model source
- Choose a model for each of the four uses, and know what to watch for when you change models later

**Estimated time: about 10 minutes**

## Applies to

- ARGENT 1.0.1 and later

## Before you begin

- Your account has ARGENT administrator permissions
- You have deployed a language model and an embedding model in AI Model Center on the same ARX device. If you want to use the OCR or Enhance model, deploy those too

## The four models ARGENT uses

<table>
<thead>
  <tr>
    <th>
      Model
    </th>
    
    <th>
      What it does
    </th>
    
    <th>
      Required?
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <strong>
        Language Model
      </strong>
    </td>
    
    <td>
      Answers questions
    </td>
    
    <td>
      Required
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Embedding Model
      </strong>
    </td>
    
    <td>
      Turns documents and queries into vectors during import and search
    </td>
    
    <td>
      Required
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        OCR Model
      </strong>
    </td>
    
    <td>
      A vision model that recognizes text block by block when you import PDF, Office and image files
    </td>
    
    <td>
      Optional. Left empty, the OCR service uses its own deployment default
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Enhance Model
      </strong>
    </td>
    
    <td>
      A vision model that corrects the recognized text
    </td>
    
    <td>
      Optional. Left empty, the OCR service uses its own deployment default
    </td>
  </tr>
</tbody>
</table>

When a required model isn't set, ARGENT shows **Models Not Ready** with the hint **Required models are not configured. Complete the setup on Model Connection.**

## Step 1: Confirm the models are running in AI Model Center

1. Open **AI Model Center** on the same ARX device and go to the **Model Instances** page
2. Confirm every model you want to use reads **Running**

![The Model Instances page in AI Model Center, with all four models Running](https://docs.ardge.com/screenshots/knowledge/en/argent/model-connection/step-1.webp)

<warning>

**Answering and file processing fail while a model isn't running:**

When a model chosen in the model settings can't be found on its source, ARGENT shows **A model chosen in the model settings was not found on its model source. It may still be loading, check the status on the ARX AI Model Center.** Start that model in AI Model Center first.

</warning>

## Step 2: Check or add a model source

1. Sign in to the ARGENT admin interface and go to the **Model Connection** page
2. Switch to the **1. Model Sources** tab
3. In the list on the left, click the source you want to check. Its **Name**, **Base URL** and **API Key** appear on the right

When ARGENT is deployed on ARX, the list has a source that points at the ARX internal model gateway. Just check that its **Base URL** has a value — you don't need to change it.

To add another model service that provides an OpenAI-compatible API:

1. Click **Add Model Source**
2. Fill in the fields as follows
3. Click **Save**

<table>
<thead>
  <tr>
    <th>
      Field
    </th>
    
    <th>
      Value
    </th>
    
    <th>
      Rules and notes
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <strong>
        Name
      </strong>
    </td>
    
    <td>
      A name that identifies this source, such as <code>
        My API gateway
      </code>
    </td>
    
    <td>
      Required. Must not match an existing source's name
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Base URL
      </strong>
    </td>
    
    <td>
      The model service's API URL, such as <code>
        https://api.example.com/v1
      </code>
    </td>
    
    <td>
      Required. Must be a valid URL
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        API Key
      </strong>
    </td>
    
    <td>
      The API key the service issued
    </td>
    
    <td>
      When you edit an existing source, leaving it empty keeps the current API key
    </td>
  </tr>
</tbody>
</table>

When the save succeeds, the page shows **Model source saved**.

![The Model Sources tab on Model Connection, with the ARX source selected](https://docs.ardge.com/screenshots/knowledge/en/argent/model-connection/step-2.webp)

<note>

**Change the model choice before you delete a model source:**

You can't delete a source while the model settings still use one of its models. The page shows **This model source is used in the model settings. Choose another model there first.**

</note>

## Step 3: Choose a model for each of the four uses

1. Switch to the **2. Model Settings** tab
2. In each of the four dropdowns — **Language Model**, **Embedding Model**, **OCR Model** and **Enhance Model** — choose the model to use. Options appear as "source name / model name", and you can type a keyword to search
3. Click **Save**

When the save succeeds, the page shows **Model connection settings saved**.

![The Model Settings tab on Model Connection, with a dropdown for each of the four models](https://docs.ardge.com/screenshots/knowledge/en/argent/model-connection/step-3-1.webp)

![The Language Model dropdown open, with options grouped by model source](https://docs.ardge.com/screenshots/knowledge/en/argent/model-connection/step-3-2.webp)

<warning>

**Regenerate the knowledge after you change the embedding model:**

When you change the **Embedding Model**, the field shows **Changing the embedding model requires re-generating the AI agent knowledge manually.** below it. The existing vectors and the new model don't share a vector space, so retrieval goes off target unless you regenerate. For why, and how, see [Why do I need to regenerate the knowledge after changing the embedding model?](https://docs.ardge.com/en/knowledge/argent/regenerate-knowledge)

</warning>

## Troubleshooting

<table>
<thead>
  <tr>
    <th>
      Message
    </th>
    
    <th>
      Likely cause
    </th>
    
    <th>
      What to do
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        Could not load models from: <name>
      </code>
    </td>
    
    <td>
      That source can't be reached right now, or its API key is wrong
    </td>
    
    <td>
      Go back to <strong>
        1. Model Sources
      </strong>
      
       and check its <strong>
        Base URL
      </strong>
      
       and <strong>
        API Key
      </strong>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        Couldn’t get the model list from a selected model source. Check its Base URL and API Key on the Model Sources tab.
      </code>
    </td>
    
    <td>
      A selected source didn't respond when you saved the model settings
    </td>
    
    <td>
      Same as above
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        Couldn’t get the model list from this endpoint. Check the Base URL.
      </code>
    </td>
    
    <td>
      The <strong>
        Base URL
      </strong>
      
       can't be reached when you add or edit a source
    </td>
    
    <td>
      Confirm the URL is correct and includes the protocol (<code>
        http://
      </code>
      
       or <code>
        https://
      </code>
      
      )
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        This model source rejected the API Key. Check that the key is correct.
      </code>
    </td>
    
    <td>
      The <strong>
        API Key
      </strong>
      
       is wrong or has expired
    </td>
    
    <td>
      Get a new key from that service
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        A model source with this name already exists.
      </code>
    </td>
    
    <td>
      The <strong>
        Name
      </strong>
      
       matches an existing source
    </td>
    
    <td>
      Use a different name
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        Enter a valid URL (e.g., https://api.example.com/v1).
      </code>
    </td>
    
    <td>
      The <strong>
        Base URL
      </strong>
      
       isn't a valid URL
    </td>
    
    <td>
      Add the protocol and the full path
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        Unable to update model connection. Please try again.
      </code>
    </td>
    
    <td>
      The save request didn't go through
    </td>
    
    <td>
      Click <strong>
        Save
      </strong>
      
       again later
    </td>
  </tr>
</tbody>
</table>

## Next steps

With the model connection set up, you can create your first agent — see [Create your first AI agent](https://docs.ardge.com/en/knowledge/argent/first-ai-agent).

## Related articles

- [Why do I need to regenerate the knowledge after changing the embedding model?](https://docs.ardge.com/en/knowledge/argent/regenerate-knowledge)
- [Call on-premises models on ARX through the API](https://docs.ardge.com/en/knowledge/arx-os/api-model-calls)


## Sitemap

See the full [sitemap](https://docs.ardge.com/sitemap.md) for all pages.
