# Ошибка LLM в Discourse AI: «Цель не может быть пустой»

**URL:** https://meta.discourse.org/t/llm-error-in-discourse-ai-target-cant-be-blank/391497
**Category:** Bug
**Tags:** ai
**Created:** [16.Декабрь.2025 20:43:54 UTC](https://meta.discourse.org/t/llm-error-in-discourse-ai-target-cant-be-blank/391497 "2025-12-16T20:43:54Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Lilly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lilly/32/575047_2.png) [@Lilly](https://meta.discourse.org/u/Lilly)
#### Post date: [16.Декабрь.2025 20:43:54 UTC](https://meta.discourse.org/t/llm-error-in-discourse-ai-target-cant-be-blank/391497/1 "2025-12-16T20:43:54Z")

</div>

Пытаюсь настроить LLM для Discourse AI, и при запуске теста получаю эту ошибку:

 ![Screenshot 2025-12-16 at 12.33.26 PM](https://global.discourse-cdn.com/meta/original/4X/8/2/4/82487da6edba9938d719865b6d37f8737f69a015.png)

У меня есть два саморазмещённых экземпляра, и на одном LLM работают нормально. На другом экземпляре я получаю эту ошибку при настройке любого из них. Свежая установка и актуальная версия Discourse на [b9e6c29871](https://github.com/discourse/discourse/commits/b9e6c298715de772d6fde213c167529ff1378dfc)

Ошибка в консоли: `422 (Unprocessable Content)`

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [16.Декабрь.2025 21:32:21 UTC](https://meta.discourse.org/t/llm-error-in-discourse-ai-target-cant-be-blank/391497/2 "2025-12-16T21:32:21Z")

</div>

Извините за это, @Lilly, это должно быть исправлено в

> <https://github.com/discourse/discourse/pull/36735>
>
> When testing a new LLM configuration in the admin panel, if the test fails (e.g.…, invalid API key), users see "Target can't be blank" instead of the actual error from the LLM provider.
> 
> This happens because \`track\_failures\` attempts to create a ProblemCheckTracker using \`llm\_model.id\` as the target, but unsaved models have \`id = nil\`, which fails the \`validates :target, presence: true\` validation.
> 
> The fix adds a \`new\_record?\` check to skip failure tracking for unsaved models, consistent with the existing checks for \`blank?\` and \`seeded?\`.
> 
> Ref - https://meta.discourse.org/t/391497

(в копию @Roman)

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [17.Декабрь.2025 00:24:30 UTC](https://meta.discourse.org/t/llm-error-in-discourse-ai-target-cant-be-blank/391497/3 "2025-12-17T00:24:30Z")

</div>



---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [17.Декабрь.2025 06:30:16 UTC](https://meta.discourse.org/t/llm-error-in-discourse-ai-target-cant-be-blank/391497/4 "2025-12-17T06:30:16Z")

</div>



---

<div class="post-metadata">

### Author: ![nat](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nat/32/235063_2.png) [@nat](https://meta.discourse.org/u/nat)
#### Post date: [20.Декабрь.2025 00:00:44 UTC](https://meta.discourse.org/t/llm-error-in-discourse-ai-target-cant-be-blank/391497/5 "2025-12-20T00:00:44Z")

</div>

Эта тема была автоматически закрыта через 2 дня. Новые ответы больше не принимаются.
