Skip to content

Studio: honor the Responses API text.format structured output - #8846

Open
NilayYadav wants to merge 1 commit into
unslothai:mainfrom
NilayYadav:fix-responses-text-format
Open

Studio: honor the Responses API text.format structured output#8846
NilayYadav wants to merge 1 commit into
unslothai:mainfrom
NilayYadav:fix-responses-text-format

Conversation

@NilayYadav

Copy link
Copy Markdown
Collaborator

/v1/responses accepted text.format and dropped it: the field is typed on ResponsesRequest but _build_chat_request never read it, so a json_schema request returned free-form prose with HTTP 200. openai-python's responses.parse(text_format=...) and the Agents SDK's output_type= both fail on that, while the same schema through /v1/chat/completions response_format works.

Map text.format onto response_format (json_schema / json_object), which _extract_response_format already routes to llama-server's grammar. {"type": "text"} and a verbosity-only text stay unconstrained, so ordinary Codex / Agents SDK requests are unchanged. This is the inverse of the mapping external_provider already does when Studio is the client of a
Responses API.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 72debc271a

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread studio/backend/routes/inference.py
Comment thread studio/backend/routes/inference.py
NilayYadav pushed a commit to NilayYadav/unsloth-staging that referenced this pull request Aug 14, 2026
@NilayYadav

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Breezy!

Reviewed commit: 72debc271a

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@NilayYadav NilayYadav closed this Aug 14, 2026
@NilayYadav
NilayYadav deleted the fix-responses-text-format branch August 14, 2026 18:51
@NilayYadav
NilayYadav restored the fix-responses-text-format branch August 14, 2026 19:00
@NilayYadav NilayYadav reopened this Aug 14, 2026
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