Skip to content

feat(openai): support GPT-5.6 structured output#1029

Open
bradleybernard wants to merge 1 commit into
prism-php:mainfrom
bradleybernard:feature/openai-gpt-5-6-structured-output
Open

feat(openai): support GPT-5.6 structured output#1029
bradleybernard wants to merge 1 commit into
prism-php:mainfrom
bradleybernard:feature/openai-gpt-5-6-structured-output

Conversation

@bradleybernard

Copy link
Copy Markdown

Description

Adds native structured-output recognition for the official GPT-5.6 API model family:

  • gpt-5.6 (Sol alias)
  • gpt-5.6-sol
  • gpt-5.6-terra
  • gpt-5.6-luna

Without these entries, StructuredModeResolver silently falls back to JSON mode, so Prism sends json_object instead of json_schema and ignores schema.strict.

OpenAI documents Structured Outputs support for each GPT-5.6 model:

The regression test covers all four identifiers and asserts Prism sends json_schema with strict: true.

This is intentionally narrower than #991, which proposes broader prefix matching for versioned model names.

Breaking Changes

None.

Test plan

  • vendor/bin/pest tests/Providers/OpenAI/StructuredTest.php
  • vendor/bin/pest (1467 passed, 8 skipped)
  • vendor/bin/phpstan analyse --memory-limit=512M
  • Pint and Rector on changed files

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.

1 participant