Optional tool parameters are seen as required

AI-generated summary

RGJ reported a bug in the built-in Move Posts AI agent tool when used with OpenAI GPT-5.6. The agent incorrectly treated optional parameters (destination_topic_id and new_title) as required, preventing users from moving posts into newly created topics. Although the tool implementation defined these fields as optional, the agent refused to omit them or set them to null.

The reporter hypothesized that the issue stemmed from the OpenAI adapter not explicitly setting the strict flag. According to OpenAI’s documentation, the Responses API may normalize the schema into strict mode when strict is omitted, requiring all properties to be present.

sam requested a fix from @meta-bot, which resulted in Discourse PR #46904 being opened. The fix addressed the strict mode normalization issue. sam subsequently confirmed the fix was deployed. RGJ verified that the issue was resolved, allowing the tool to function correctly with optional parameters.

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.

1 Like

@meta-bot open a PR for fix/openai-strict-optional-tools

give a quick rundown of the fix and why it works

Discourse PR #46904 is open.

Review checkpoint schedule confirmed.

this is now fixed @RGJ … let me know how it goes.

2 Likes

Yes! I can confirm this is working now.

Thank you for the quick and effective resolution!

2 Likes

This topic was automatically closed after 3 days. New replies are no longer allowed.