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

# AI Models & Setup

> Connect one or more AI models, set a default, and configure token and budget limits for mogenius AI features.

All AI features in mogenius — [Agents](/ai/agents) and [Chat](/ai/chat) — run on the AI models you connect to your cluster. You can register **several models** and choose which one is the default and which are available in chat.

Models are managed centrally under **Cluster Settings → AI** and shared across the whole cluster.

## Connecting an AI model

Open **Cluster Settings → AI** and add a model. Each model has the following fields:

* **SDK** — The provider: **OpenAI**, **Anthropic**, or **Ollama**. Choose OpenAI for any OpenAI‑compatible endpoint.
* **Model** — The model identifier. Pick from the list the provider returns; if none appear, check the endpoint and authentication.
* **API URL** — The endpoint URL. Required for Ollama and for OpenAI‑compatible providers; the standard OpenAI and Anthropic endpoints are used by default otherwise. Any [OpenAI‑compatible API endpoint](https://bentoml.com/llm/llm-inference-basics/openai-compatible-api) works.
* **API Key** — Authentication for the endpoint. Enter a key as plain text and mogenius stores it as a managed Kubernetes secret, or reference an existing secret. Ollama endpoints that require no authentication can be left without a key.

After saving, mogenius validates the connection and the model becomes available to your cluster.

<Note>
  You can add multiple models — for example a fast model for chat and a more capable model for agents. Each is stored as its own resource and can be edited, tested, or removed independently.
</Note>

## Default and chat‑enabled models

* **Default** — Mark one model as the cluster default. Agents that don't specify their own model, and new chat sessions, use it automatically.
* **Chat enabled** — Toggle whether a model appears in the chat model picker. This lets you keep some models for agents only.

## Token and budget limits

Limits are configured **per model**, so each model carries its own budget:

* **Daily token limit** — The maximum tokens the model may consume per day across agents and chat (`0` = unlimited). Once reached, further work is queued until the limit resets.
* **Token budget per run** — A per‑run cap on tokens (`0` = unlimited). Agents can override this in their own [budget settings](/ai/agents#budgets).
* **Max tool calls per run** — A per‑run cap on how many tool calls the model may make. Agents can override this too.

Each model shows its current usage, and you can **reset the usage** counter manually at any time.

## Testing and maintenance

The model list provides administrative controls per model:

* **Test** — Runs a connectivity probe against the endpoint and reports whether the model is reachable and correctly authenticated. A readiness badge reflects the current state.
* **Reset usage** — Resets the recorded token usage for that model to zero.

## Next steps

* Configure what your agents do in [Agents](/ai/agents).
* Give agents extra capabilities in [Tools & Custom MCP Servers](/ai/tools).
* Start an interactive session in [Chat](/ai/chat).
