# AI 助手可能建议了该类别中不允许使用的标签

**URL:** <https://meta.discourse.org/t/ai-helper-can-suggest-tags-not-allowed-in-category/404423>\
**Category:** Bug\
**Tags:** ai, ai-helper, fixed\
**Created:** [2026年六月3日 13:22 UTC](https://meta.discourse.org/t/ai-helper-can-suggest-tags-not-allowed-in-category/404423 "2026-06-03T13:22:05Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![thgl](https://avatars.discourse-cdn.com/v4/letter/t/f08c70/32.png) [@thgl](https://meta.discourse.org/u/thgl)\
**Post date:** [2026年六月3日 13:22 UTC](https://meta.discourse.org/t/ai-helper-can-suggest-tags-not-allowed-in-category/404423/1 "2026-06-03T13:22:05Z")

</div>

我注意到，用于建议标签的 AI 助手有时会推荐在当前所选类别中不被允许的标签。

例如，在这里，我试图发布到一个不允许使用“问题/讨论”标签的类别：

 ![image](https://global.discourse-cdn.com/meta/original/4X/d/a/4/da425aa6e262eac169d27f82e0be2240d52b4359.png)

我实际上甚至可以选择它，但无法提交：

 ![image](https://global.discourse-cdn.com/meta/original/4X/f/0/9/f09e052d3e95c21579b4094ee965b4be78ca23ba.png)

如果我尝试手动添加相同的标签，系统会正确识别其为受限标签：

 ![image](https://global.discourse-cdn.com/meta/original/4X/3/e/0/3e0a792c3d61df3448a3a35cc104bdeed254b315.png)

**预期行为**

我认为，如果 AI 助手能够尊重标签或标签组的限制，并且仅推荐当前所选类别中允许的标签，会更加合理。

---

<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:** [2026年六月3日 13:22 UTC](https://meta.discourse.org/t/ai-helper-can-suggest-tags-not-allowed-in-category/404423/2 "2026-06-03T13:22:50Z")

</div>

感谢你的报告 @thgl - 我会查看一下 👀

---

<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:** [2026年六月3日 16:06 UTC](https://meta.discourse.org/t/ai-helper-can-suggest-tags-not-allowed-in-category/404423/4 "2026-06-03T16:06:00Z")

</div>

一旦此内容经过审查 ✅、合并 :git_merged: 并部署 🚀，问题就会得到修复。

> <https://github.com/discourse/discourse/pull/40545>
>
> Previously, the AI helper's tag suggester could recommend tags the selected cate…gory doesn't allow — it filtered candidates only by tag visibility and was never told the composer's category, so a user could pick a suggestion they then couldn't submit (while adding the same tag manually was correctly blocked).
> 
> This change routes the suggested tags through the same \`DiscourseTagging.filter\_allowed\_tags\` rules the tag chooser and topic-save validation use, scoped to the selected category and already-selected tags, so only submittable tags are suggested.
> 
> Meta: https://meta.discourse.org/t/ai-helper-can-suggest-tags-not-allowed-in-category/404423

---

<div class="post-metadata">

**Author:** ![thgl](https://avatars.discourse-cdn.com/v4/letter/t/f08c70/32.png) [@thgl](https://meta.discourse.org/u/thgl)\
**Post date:** [2026年六月3日 16:08 UTC](https://meta.discourse.org/t/ai-helper-can-suggest-tags-not-allowed-in-category/404423/5 "2026-06-03T16:08:00Z")

</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:** [2026年六月10日 01:59 UTC](https://meta.discourse.org/t/ai-helper-can-suggest-tags-not-allowed-in-category/404423/7 "2026-06-10T01:59:12Z")

</div>


