Skip to content

Add structured provider output - #517

Merged
chubes4 merged 3 commits into
mainfrom
feat/516-structured-output
Aug 22, 2026
Merged

Add structured provider output#517
chubes4 merged 3 commits into
mainfrom
feat/516-structured-output

Conversation

@chubes4

@chubes4 chubes4 commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add a normalized JSON Schema structured-output contract at the provider-turn boundary
  • preserve parsed JSON object, list, scalar, and null shapes through the conversation and canonical chat results
  • map bare wp-ai-client turns through its public JSON output APIs; strict mode validates the documented local schema subset and returns redacted typed failures
  • fail closed for tool or streaming combinations and redact public diagnostics

Verification

  • composer validate --no-check-publish
  • composer phpstan
  • composer smoke
  • focused provider-turn, default adapter, chat schema, and default chat handler smoke suites

Fixes #516

AI assistance

OpenCode with openai/gpt-5.6-sol implemented and revised the provider-neutral contract, inspected the installed wp-ai-client APIs, and added focused tests. Chris Huber reviewed and remains responsible for the change.

@chubes4
chubes4 merged commit a9b3f55 into main Aug 22, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add provider-turn structured output contract

2 participants