# AiModelOverride

A model a run uses for one agent in place of the one its definition names: either a model from Maitento's catalogue (`aiModelId`) or one defined inline (`customModel`). Exactly one of the two is set.

**Kind:** an object, used in responses.

## Fields

Every field is present in a response; empty ones are `null`.

| Field | Type | Description |
|---|---|---|
| `agentName` | `string` | The agent (its name in the interaction) the override applies to. |
| `aiModelId` | `uuid \| null` | The id of the catalogue model to use. Null when `customModel` defines the model instead. |
| `customModel` | [`InlineAiModelDefinition`](https://docs.maitento.com/reference/types/inline-ai-model-definition.md)`\| null` | A model defined inline, for one that isn't in the catalogue. Null for a catalogue model. |
| `purpose` | [`AiModelOverridePurpose`](https://docs.maitento.com/reference/types/ai-model-override-purpose.md) | Which of the agent's models this replaces: the one it runs on, or the one that vets what its loom offers it. |

## Example

```json
{
  "agentName": "...",
  "aiModelId": "3f2b8c1e-5d4a-4e6b-9c7d-2a1b0c9d8e7f",
  "customModel": {
    "name": "...",
    "apiType": "...",
    "modelIdentifier": "...",
    "credentialProvider": "...",
    "contextWindowTokens": 0,
    "maxOutputTokens": 0,
    "supportsJsonSchemaResponseFormat": false,
    "tokenizerFamily": "...",
    "reasoningEffort": "..."
  },
  "purpose": "Agent"
}
```

## Where it's used

- Inside [`InteractionProcess`](https://docs.maitento.com/reference/types/interaction-process.md)
- Inside [`InteractionProcessWithDetails`](https://docs.maitento.com/reference/types/interaction-process-with-details.md)
