Optional tool parameters are seen as required

AI-generated summary

RGJ reports a bug where the built-in Move Posts AI agent tool, when used with OpenAI GPT-5.6, incorrectly treats optional parameters (destination_topic_id and new_title) as required. This issue prevents users from moving posts to newly created topics, although moving posts to existing topics continues to function correctly. Although the tool’s implementation defines these fields as optional, allowing for either a destination ID or a new title, the agent rejects omitting them or setting destination_topic_id to null. The poster hypothesizes that the problem stems from how OpenAI handles tool schemas. Specifically, the OpenAI adapter in Discourse does not explicitly set the strict flag. According to OpenAI documentation, the Responses API may default to strict mode if this flag is omitted, which mandates that all properties in the schema must be present. This forced presence of optional fields is likely causing the reported behavior.

When using the built-in Move Posts AI agent tool with OpenAI GPT-5.6, the agent reports that it cannot omit either destination_topic_id or new_title. It also reports that it cannot set destination_topic_id to null.

This prevents moving posts into a newly created topic. Moving posts into an existing topic has worked.

The tool implementation defines both fields as optional and expects either a destination topic ID or a new title.

Could this be related to the OpenAI tool schema? The OpenAI adapter does not appear to set strict explicitly. According to OpenAI’s documentation, the Responses API may normalize the schema into strict mode when strict is omitted. Strict mode requires all properties to be present.