Skip to content

docs(readme): clarify response_format vs text for structured outputs#413

Merged
nezhyborets merged 1 commit intomainfrom
claude/issue-392-readme-structured-outputs
Apr 30, 2026
Merged

docs(readme): clarify response_format vs text for structured outputs#413
nezhyborets merged 1 commit intomainfrom
claude/issue-392-readme-structured-outputs

Conversation

@Krivoblotsky
Copy link
Copy Markdown
Contributor

Summary

Closes #392.

A user reported confusion about why the Structured Outputs section seemed to claim both ChatQuery and CreateModelResponseQuery share a responseFormat parameter, when in practice CreateModelResponseQuery uses text:. The naming mirrors the OpenAI API's own field names (response_format for Chat Completions, text for Responses), so this is intentional — the README just didn't make it explicit.

This PR:

  • Adds a note at the top of the Structured Outputs section explaining both spellings and pointing out that the same JSONSchemaDefinition value works for either query type.
  • Fixes the bullet under JSONSchemaDefinition.derivedJsonSchema that previously implied both query types use `responseFormat:`.

No code changes; docs only.

Test plan

  • Render README.md on GitHub and confirm the [!NOTE] block displays as a styled callout, and the second bullet under derivedJsonSchema reads naturally.

🤖 Generated with Claude Code

The Structured Outputs section implied both ChatQuery and
CreateModelResponseQuery share a single response-format parameter,
but they don't: ChatQuery uses responseFormat:, while
CreateModelResponseQuery uses text:. The naming mirrors the OpenAI
API's own response_format / text fields, so this is intentional —
the README just didn't say so.

Add a note at the top of the section explaining both spellings, and
fix the bullet under JSONSchemaDefinition.derivedJsonSchema that only
mentioned responseFormat.

Closes #392

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@nezhyborets nezhyborets merged commit fd447f9 into main Apr 30, 2026
3 checks passed
@nezhyborets nezhyborets deleted the claude/issue-392-readme-structured-outputs branch April 30, 2026 10:01
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.

Small confusion about responseFormat vs text in CreateModelResponseQuery

2 participants