# オプションのツールパラメータが必須として認識される

**URL:** <https://meta.discourse.org/t/optional-tool-parameters-are-seen-as-required/418302>\
**Category:** Bug\
**Tags:** ai-plugin\
**Created:** [2026 年 11 月 25 日午後 1:53 UTC](https://meta.discourse.org/t/optional-tool-parameters-are-seen-as-required/418302 "2026-11-25T13:53:42Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)\
**Post date:** [2026 年 11 月 25 日午後 1:53 UTC](https://meta.discourse.org/t/optional-tool-parameters-are-seen-as-required/418302/1 "2026-11-25T13:53:42Z")

</div>

OpenAI GPT-5.6で組み込みの **Move Posts** AIエージェントツールを使用すると、エージェントは `destination_topic_id` と `new_title` のいずれかを省略できないと報告します。また、`destination_topic_id` を `null` に設定できないとも報告されます。

これにより、新規作成したトピックに投稿を移動することができません。既存のトピックへの投稿移動は機能しています。

[ツール実装](https://github.com/discourse/discourse/blob/main/plugins/discourse-ai/lib/agents/tools/move_posts.rb)では、両方のフィールドをオプションとして定義しており、移動先トピックIDまたは新しいタイトルが提供されることを想定しています。

これはOpenAIのツールスキーマに関連している可能性ありますか？ [OpenAIアダプター](https://github.com/discourse/discourse/blob/main/plugins/discourse-ai/lib/completions/dialects/open_ai_tools.rb)では、`strict` が明示的に設定されていないようです。[OpenAIのドキュメント](https://developers.openai.com/api/docs/guides/function-calling)によると、`strict` が省略された場合、Responses APIはスキーマをstrictモードに正規化する可能性があります。strictモードでは、すべてのプロパティの存在が必須となります。

---

_[View the full topic](https://meta.discourse.org/t/optional-tool-parameters-are-seen-as-required/418302)._
