> For the complete documentation index, see [llms.txt](https://codemash.gitbook.io/codemash/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://codemash.gitbook.io/codemash/cloud/ai/llm/set-default.md).

# Set the default LLM

Choose which LLM the project's AI uses when an assistant has none of its own.

**Where:** Project → Settings → **AI** → **Default LLM** · `/projects/<project>/settings?tab=AI`

There are two defaults, and the AI uses the first one that is set:

1. the LLM of the assistant itself (Project → Settings → AI → **Assistants**);
2. the project's **Default LLM** on the AI settings tab — this page;
3. the integration with the **DEFAULT** badge in the LLM list. The first LLM you add to an environment gets the badge.

## Before you start

* At least one enabled [LLM integration](/codemash/cloud/ai/llm.md) in the environment you work in. Disabled ones are shown in the list but cannot be picked.
* The `project:update` permission on the project settings. The full AI tab is described on [Project → Settings → AI](/codemash/cloud/project/settings/ai.md).

## Steps

1. Open **Project → Settings** and press the **AI** tab. Under **Default LLM** (*Used by every assistant that has no LLM of its own.*) the **Integration** list suggests the environment's default, marked **— env default**.

   <figure><img src="https://712692422-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHy372bqsaex2cqS3ikhL%2Fuploads%2Fgit-blob-c4f2690a6fa2b8e0a1de6af0ae3dc54c24dc8ab7%2Fllm-set-default-1.png?alt=media" alt="Project Settings, AI tab: End-user AI (Chat hidden), Default LLM with Integration Support assistant — env default, Model Integration default model, Save default"><figcaption><p>The Default LLM section.</p></figcaption></figure>
2. Pick the integration and the model:

   | Field       | Required | What it does                                                                                         | Example                     |
   | ----------- | -------- | ---------------------------------------------------------------------------------------------------- | --------------------------- |
   | Integration | yes      | The LLM integration to use. **None** clears the project default (the env default is used again).     | `Report writer`             |
   | Model       | no       | A model of that integration. **Integration default model** uses the integration's **Default Model**. | `Integration default model` |

   Until you save, a grey line says *Not saved yet — the environment's default LLM is suggested.*

   <figure><img src="https://712692422-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHy372bqsaex2cqS3ikhL%2Fuploads%2Fgit-blob-e16b37a103d3ded365cec0b0c94b1742c5ed8e43%2Fllm-set-default-2.png?alt=media" alt="Default LLM with Integration Report writer, Model Integration default model, and the line Not saved yet — the environment&#x27;s default LLM is suggested"><figcaption><p>Report writer picked, not saved yet.</p></figcaption></figure>
3. Press **Save default**.

   <figure><img src="https://712692422-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHy372bqsaex2cqS3ikhL%2Fuploads%2Fgit-blob-8a7c689e9a1e5fc770c1ef6985839a91bd82717a%2Fllm-set-default-3.png?alt=media" alt="Default LLM saved: Integration Report writer, Model Integration default model; the Not saved yet line is gone"><figcaption><p>After save.</p></figcaption></figure>

## Result

The grey line is gone and the section shows the saved integration. From now on every assistant without an LLM of its own runs on `Report writer`. The **DEFAULT** badge in the LLM list does not move — it is the environment default, used only when the project has no Default LLM.

{% hint style="warning" %}
Cloud has no button to move the **DEFAULT** badge to another integration (the integration's **Actions** menu has no *Set as default*). Use the SDK, the CLI or the API below. The badge matters only when the project's Default LLM is empty.
{% endhint %}

## Change or remove it later

* Pick another integration and press **Save default** again, or pick **None** to fall back to the integration with the **DEFAULT** badge.
* If you [disable or delete](/codemash/cloud/ai/llm/disable.md) the integration that is the default, the AI uses the next one in the order above.

## Do it from code

Move the **DEFAULT** badge (the environment default):

```ts
await norbix.hub.ai.setLlmIntegrationAsDefault({ id: 'int_75yrG0DvqF9M9yyJRZ5Gki' });
// a few seconds later getLlmIntegrations() answers defaultIntegrationId: 'int_75yrG0DvqF9M9yyJRZ5Gki'
```

```sh
norbix hub ai llm integration as default set --id int_44q3sq04tnjAzbPYAmFskM
```

The client setup is on the [AI page](/codemash/cloud/ai.md#use-it-from-code). API: [Set Llm Integration As Default](/codemash/api-reference/ai/integrations/set-llm-integration-as-default.md). The project Default LLM is part of the project AI settings — see [Project → Settings → AI](/codemash/cloud/project/settings/ai.md).
