> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ainomos.ch/llms.txt
> Use this file to discover all available pages before exploring further.

# Connect a model

> Add a provider or your own model on the Models page, set the defaults, and manage limits and retired models.

The **Models** page decides which language models Ainomos may use. You connect a model, Ainomos sends it a real test request, and only a model that answers is added. For what models do, see [Models in Ainomos](https://docs.ainomos.ch/models/overview.md).

Who can do this: platform admins.

## Open the Models page

Open **Settings**, then **Models**. The page, headed **Model catalog**, shows **Coverage by data class**, **What each job uses**, the table **Models in the catalog**, and the form **Connect a model**.

The table has these columns:

| Column | What it shows |
| - | - |
| **Model** | The name people see, the provider, and **Platform** or **Organisation**. |
| **Does** | **Answers** (chat) or **Embeds** (search). **Default** and **Embedder** mark the models in use. |
| **Runs** | **In cluster**, **Customer cloud** or **External**. |
| **May answer in** | The data classes the model is allowed in. |
| **Limits, in tokens** | How much text the model reads and writes. |

## Connect a model

The form asks one question at a time. An answered step folds up and shows its answer, with **Change** to open it again.

**1. Provider**

Pick a provider tile, or **Custom / other endpoint**. Each tile shows where the provider processes data.

**2. Credentials**

Enter what the provider needs (see below). For OpenAI, Anthropic and OpenRouter, select **Check this key**: the key is checked first, and the models it can reach are read in the same step.

**3. Models**

Tick models in the list, or type a model ID.

**4. Data classes**

Choose the classes the model may answer in.

**5. Connect and test**

Select **Connect and test**, or **Connect and test 3 models** for several. Each model is registered, tested and saved on its own; one failure does not stop the others. A model that fails its test is not added, and the reason is shown.

### What each provider asks for

| Provider | Fields |
| - | - |
| OpenAI, Anthropic, OpenRouter | **API key**. Ainomos warns if it looks like another provider's key. |
| Amazon Bedrock | **Access key ID**, **Secret access key** and **Region**. |
| Azure OpenAI | **Endpoint URL**, **API key**, **API version**, and later the **Deployment name** from Azure. |
| **Custom / other endpoint** | **Endpoint URL** of an OpenAI-compatible service, ending in /v1, and **Sign-in**. |

Keys and secrets are stored encrypted and never shown again.

### How a custom endpoint signs in

| **Sign-in** option | What it means |
| - | - |
| **API key** | A fixed key. Optional for services that run without one. |
| **OAuth: your identity provider** | Ainomos fetches short-lived tokens instead of using a fixed key. Enter **Token URL**, **Client ID** and **Client secret**. **Scope** and **Audience** are optional; Entra ID expects a scope, Auth0 an audience. |
| **OAuth: issued by Ainomos** | Ainomos creates a sign-in client for the model. After connecting, **Configure your model's gateway** shows the **Issuer URL**, **JWKS URL**, **Client ID** and **Audience** to set up in front of your model. |

With OAuth, a gateway in front of your model must check the tokens. Without one, the endpoint accepts every request.

### Pick from the list, or type an ID

For a custom endpoint, select **Load models**: Ainomos reads the models at the address and tests them. For a provider, the list comes with the key check and each model is tested when it connects. The list shows:

* **Model at the endpoint**: the provider's identifier.
* **Name in this app**: what people see in the model picker. It starts as the part after the last slash; change it before connecting.
* **Does**: **Answers**, **Embeds**, **Answers and embeds**, or **Neither**. A model that does neither cannot be used.
* **Input limit**: how many tokens the model reads, if known.

You can tick only one embedding model, and not a model that is already connected. **Read again** reloads the list.

Select **Type a model ID instead** when the list is empty or lacks the model. Azure OpenAI, Amazon Bedrock and **OAuth: issued by Ainomos** always work this way. You answer:

* **What is this model for?**: **Let Ainomos find out by testing (recommended)**, **Chat** or **Embeddings**.
* **Model**: the provider's model ID, or the **Deployment name** for Azure, and **Name in this app**.

### Choose the data classes

For a custom endpoint, first answer **Where is it processed?**: **External**, **Customer cloud** or **In cluster**. For a named provider this is fixed and stated.

Then tick the classes. The form preselects every class up to the most protected class your rooms use, leaving out C3 for an external model. Ticking C3 on an external model shows a warning: choose it only for your own model, on infrastructure you control. The override is recorded in the audit log. In the list, the classes apply to every ticked model.

## Set the default models

Under **What each job uses**:

* **Answers questions**: pick an active chat model, then **Save as default**. Chat uses it unless a person picks another model, and background work always uses it.
* **Embeds text for search**: pick the embedding model, then **Save embedding model**. Once passages are stored, only the current model can be chosen. When the platform provides the embedding model, the field is read-only.

## Edit a model

Select **Edit** on a row. The data classes can only be changed here, so nothing sensitive is one stray click away.

| Field | What it does |
| - | - |
| **Residency** | Where the model processes data. |
| **Price note** | A free note about cost. |
| **Allowed data classes** | At least one is required. |
| **Limits** | **Input limit, in tokens** and **Output limit, in tokens**. |
| **Active (available for requests)** | Off means no room can use the model. |
| **Wiring (managed models only)** | **Endpoint URL** and **API key**, or the OAuth fields, for **Organisation** models. Leave the key empty to keep it. A changed address is tested again on save. |
| **Override reason** | Required when an external model gets C3. |

## Token limits

A token is a short piece of a word. Ainomos keeps requests within a model's known limits and shortens or splits longer text first. Beside each limit, the panel says where the number came from, for example reported by the endpoint, learned from a refusal, or set by you.

* **Read limits again** asks the endpoint once more.
* Type a whole number to set a limit; leave the field empty to clear it.
* An embedding model with an unknown input limit is treated as reading 2,048 tokens.
* A chat model with an unknown limit gets none until you enter one or the model reports it when refusing a request.

## Retire or bring back a model

* **Retire** makes the model inactive and marks it **retired**. Rooms can no longer use it. An **Organisation** model is also removed from the gateway that connects Ainomos to the provider.
* **Activate** brings back a retired **Platform** model.
* **Reconnect** opens a retired **Organisation** model. Enter its API key again; a model that signs in with OAuth needs none. Saving tests it again.

Every connection, change and retirement is recorded as evidence.

## Related

* [Models in Ainomos](https://docs.ainomos.ch/models/overview.md)
* [Usage and budgets](https://docs.ainomos.ch/models/usage-and-budgets.md)
* [Data classes](https://docs.ainomos.ch/privacy/data-classes.md)
* [Audit log](https://docs.ainomos.ch/privacy/audit-log.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.