Summary
PR #1900 ("Require canonical AI tool schemas") removed RequestBuilder::normalizeToolParameters auto-normalization, but did not sweep DM's own tool registrations. Multiple core handlers and tools still emit the legacy property-keyed shape ({name => {type, required: true|false, description}}) which now fails OpenAI provider validation post-0.106.1.
Affected scopes
Three distinct buckets, all using the same legacy shape, all need the same canonical conversion ({type: object, properties: {...}, required: [...]}):
1. Chat tools (inc/Api/Chat/Tools/)
~30 files. Each getToolDefinition() returns a parameters block in legacy property-keyed shape. Spot-checked:
CreatePipeline.php
ManageQueue.php, ListFlows.php, AssignTaxonomyTerm.php, GetProblemFlows.php, ReorderPipelineSteps.php, GetHandlerDefaults.php, SetHandlerDefaults.php, ConfigurePipelineStep.php, SendPing.php, DeleteFlow.php, AddPipelineStep.php, DeleteFile.php, UpdateFlow.php, DeletePipeline.php, CreateFlow.php, CreateTaxonomyTerm.php, ReadLogs.php, MergeTaxonomyTerms.php, ManageJobs.php, DeletePipelineStep.php, ExecuteWorkflowTool.php, SearchTaxonomyTerms.php, SystemHealthCheck.php, AuthenticateHandler.php, ConfigureFlowSteps.php, ManageLogs.php, UpdateTaxonomyTerm.php, ApiQuery.php, CopyFlow.php, RunFlow.php
2. Global AI tools (inc/Engine/AI/Tools/Global/)
7 files. Some may be settings-UI rather than tool schemas — needs per-file verification:
BingWebmaster.php, AmazonAffiliateLink.php, GoogleSearchConsole.php, GoogleSearch.php, ImageGeneration.php, GoogleAnalytics.php, PageSpeed.php
3. Handler tool registrations (inc/Core/Steps/Publish/Handlers/)
2 files. Same pattern as the just-fixed data-machine-events/EventUpsertFilters (Extra-Chill/data-machine-events#235):
WordPress/WordPress.php — wordpress_publish tool, lines ~47–80; merges with TaxonomyHandler::getTaxonomyToolParameters() output
Email/Email.php — email_publish tool, lines ~45–70
Out of scope (do NOT touch)
These also use required: true|false but legitimately, per WordPress conventions:
inc/Api/** (non-Chat) — WP REST API args definitions consumed by register_rest_route(). Property-level required is the official WP REST contract.
inc/Core/Steps/**Settings.php, inc/Core/Steps/**Auth.php, inc/Core/Steps/SystemTask/SystemTaskSettings.php — DM's own settings-UI form field defs, separate convention.
inc/Abilities/** input/output schemas — these follow the WP Abilities API spec and are consumed by abilities, not sent to OpenAI directly. Any change here needs a separate audit (filed as follow-up).
Conversion rules
Identical to the rules used in Extra-Chill/data-machine-events#232 and #235:
- Wrap properties under
{ 'type' => 'object', 'properties' => array(...), 'required' => array(...) }.
- Move every property where
required => true into the top-level required[] string list.
- Drop
required => false entirely (no-op).
- Omit
required key if no required properties (don't emit empty array).
- Every
type: array property must declare items (OpenAI strict mode requirement). Use items: { type: object } for structured items, items: { type: string } for string lists.
- Preserve all other property keys (
description, enum, etc.).
For the handler-tool registrations in scope 3, the merge logic also needs adjusting — TaxonomyHandler::getTaxonomyToolParameters() already returns shape-compatible bare-properties (no required flags, items present on arrays), so the registration site can wrap the merged result in the canonical envelope without touching TaxonomyHandler itself.
Backwards compatibility
Canonical schemas are accepted by both DM 0.103.x (passthrough via the still-present normalizer in older versions) and DM 0.106.1+ (passthrough literal). Safe to merge ahead of any deploy.
Proposed dispatch
Three parallel PRs from three minions, one per scope above. Tracked by this issue.
Why now
Blocks DM 0.106.1 deploy on extrachill.com. Will block deploy on every site using these handlers/tools.
References
Summary
PR #1900 ("Require canonical AI tool schemas") removed
RequestBuilder::normalizeToolParametersauto-normalization, but did not sweep DM's own tool registrations. Multiple core handlers and tools still emit the legacy property-keyed shape ({name => {type, required: true|false, description}}) which now fails OpenAI provider validation post-0.106.1.Affected scopes
Three distinct buckets, all using the same legacy shape, all need the same canonical conversion (
{type: object, properties: {...}, required: [...]}):1. Chat tools (
inc/Api/Chat/Tools/)~30 files. Each
getToolDefinition()returns aparametersblock in legacy property-keyed shape. Spot-checked:CreatePipeline.phpManageQueue.php,ListFlows.php,AssignTaxonomyTerm.php,GetProblemFlows.php,ReorderPipelineSteps.php,GetHandlerDefaults.php,SetHandlerDefaults.php,ConfigurePipelineStep.php,SendPing.php,DeleteFlow.php,AddPipelineStep.php,DeleteFile.php,UpdateFlow.php,DeletePipeline.php,CreateFlow.php,CreateTaxonomyTerm.php,ReadLogs.php,MergeTaxonomyTerms.php,ManageJobs.php,DeletePipelineStep.php,ExecuteWorkflowTool.php,SearchTaxonomyTerms.php,SystemHealthCheck.php,AuthenticateHandler.php,ConfigureFlowSteps.php,ManageLogs.php,UpdateTaxonomyTerm.php,ApiQuery.php,CopyFlow.php,RunFlow.php2. Global AI tools (
inc/Engine/AI/Tools/Global/)7 files. Some may be settings-UI rather than tool schemas — needs per-file verification:
BingWebmaster.php,AmazonAffiliateLink.php,GoogleSearchConsole.php,GoogleSearch.php,ImageGeneration.php,GoogleAnalytics.php,PageSpeed.php3. Handler tool registrations (
inc/Core/Steps/Publish/Handlers/)2 files. Same pattern as the just-fixed
data-machine-events/EventUpsertFilters(Extra-Chill/data-machine-events#235):WordPress/WordPress.php—wordpress_publishtool, lines ~47–80; merges withTaxonomyHandler::getTaxonomyToolParameters()outputEmail/Email.php—email_publishtool, lines ~45–70Out of scope (do NOT touch)
These also use
required: true|falsebut legitimately, per WordPress conventions:inc/Api/**(non-Chat) — WP REST APIargsdefinitions consumed byregister_rest_route(). Property-levelrequiredis the official WP REST contract.inc/Core/Steps/**Settings.php,inc/Core/Steps/**Auth.php,inc/Core/Steps/SystemTask/SystemTaskSettings.php— DM's own settings-UI form field defs, separate convention.inc/Abilities/**input/output schemas — these follow the WP Abilities API spec and are consumed by abilities, not sent to OpenAI directly. Any change here needs a separate audit (filed as follow-up).Conversion rules
Identical to the rules used in Extra-Chill/data-machine-events#232 and #235:
{ 'type' => 'object', 'properties' => array(...), 'required' => array(...) }.required => trueinto the top-levelrequired[]string list.required => falseentirely (no-op).requiredkey if no required properties (don't emit empty array).type: arrayproperty must declareitems(OpenAI strict mode requirement). Useitems: { type: object }for structured items,items: { type: string }for string lists.description,enum, etc.).For the handler-tool registrations in scope 3, the merge logic also needs adjusting —
TaxonomyHandler::getTaxonomyToolParameters()already returns shape-compatible bare-properties (no required flags, items present on arrays), so the registration site can wrap the merged result in the canonical envelope without touchingTaxonomyHandleritself.Backwards compatibility
Canonical schemas are accepted by both DM 0.103.x (passthrough via the still-present normalizer in older versions) and DM 0.106.1+ (passthrough literal). Safe to merge ahead of any deploy.
Proposed dispatch
Three parallel PRs from three minions, one per scope above. Tracked by this issue.
Why now
Blocks DM 0.106.1 deploy on extrachill.com. Will block deploy on every site using these handlers/tools.
References