> 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/test.md).

# Test an LLM integration

Test an LLM integration — Norbix checks that its key is stored and can be read.

**Where:** Project → Integrations → LLM → an integration → **Test integration** · `/projects/<project>/ai/llms/integrations/<integrationId>/edit`

## Before you start

* The integration is saved — see [Providers](/codemash/cloud/ai/llm/providers.md). A new integration shows the test panel right after the first **Save**.

{% hint style="warning" %}
The test does **not** call the provider. It only checks that Norbix can read the stored key (the one check is called **secrets**). A wrong or expired key, a wrong endpoint or a model name that does not exist all pass. To check the provider for real, ask the [AI chat](/codemash/cloud/ai/ai-chat.md) a question with this integration picked.
{% endhint %}

## Steps

1. Open **Project → Integrations**, tab **LLM**, and press the integration, here `Report writer` (Anthropic). The badges under the title say **ENABLED** and **NOT TESTED**; the panel at the bottom says *Run test after successful save.*

   <figure><img src="https://712692422-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHy372bqsaex2cqS3ikhL%2Fuploads%2Fgit-blob-df3175960b55f7643b5e06fac47ac8979e2d3271%2Fllm-test-1.png?alt=media" alt="Editing Anthropic integration: badges ENABLED and NOT TESTED, the id int_75yrG0DvqF9M9yyJRZ5Gki, API Key, Endpoint, Default Model claude-sonnet-4-6, Integration Name Report writer"><figcaption><p>The integration before the test.</p></figcaption></figure>
2. Scroll down and press **Test integration**. While it runs the button says **Testing...**.

## Result

The panel shows **Test passed** with the time of the run and one line, **secrets — Success**; the badge becomes **TESTED**. The run is kept: the list and the next visit show the same result.

<figure><img src="https://712692422-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHy372bqsaex2cqS3ikhL%2Fuploads%2Fgit-blob-d7edc2ee67506689d4932db4ec37fb7f4a49ac7e%2Fllm-test-2.png?alt=media" alt="Test passed, Last run 10/6/2026 4:12 PM, secrets Success, and the Test integration button"><figcaption><p>Test passed — the key in this example is a made-up placeholder, which shows that the test does not reach Anthropic.</p></figcaption></figure>

The test fails only when the stored key cannot be read (for example the integration was restored without its secret); the panel then says **Test failed** with the reason, and the badge **TEST FAILED**.

## Change or remove it later

* Change the key: type it again in **API Key**, press **Save**, and test again (the key is never shown back).
* [Set the default LLM](/codemash/cloud/ai/llm/set-default.md), or [disable or delete](/codemash/cloud/ai/llm/disable.md) the integration.

## Do it from code

```ts
const { items } = await norbix.hub.ai.testLlmIntegration({ integrationId: 'int_75yrG0DvqF9M9yyJRZ5Gki' });
console.log(items); // [ { operation: 'secrets', result: 'OK' } ]
```

```sh
norbix hub ai llm integration test --integrationId int_75yrG0DvqF9M9yyJRZ5Gki
```

The client setup is on the [AI page](/codemash/cloud/ai.md#use-it-from-code). API: [Test Llm Integration](/codemash/api-reference/ai/integrations/test-llm-integration.md)
