Skip to content

Deprecate the old response_schema#47320

Open
Rocketknight1 wants to merge 3 commits into
mainfrom
deprecate_response_schema
Open

Deprecate the old response_schema#47320
Rocketknight1 wants to merge 3 commits into
mainfrom
deprecate_response_schema

Conversation

@Rocketknight1

@Rocketknight1 Rocketknight1 commented Jul 14, 2026

Copy link
Copy Markdown
Member

CI

We prototyped response parsing using a response_schema attribute, but this had a few issues in practice: It was fragile, the regexes were hard to write, and it required a complete message to parse, so it didn't support streaming.

We've got a new and much more robust system now using the response_template attribute. The only models using response_schema are Gemma4, and there are PRs open to all of them to update that. Once that update is in, we should be able to merge this and drop response_schema entirely, and response_template is then the official and only way to do response parsing, and we can start adding those templates everywhere!

@github-actions

Copy link
Copy Markdown
Contributor

[For maintainers] Suggested jobs to run (before merge)

run-slow: gemma4_unified

@HuggingFaceDocBuilderDev

Copy link
Copy Markdown

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@Rocketknight1 Rocketknight1 force-pushed the deprecate_response_schema branch from 5fa27f0 to e07dae7 Compare July 14, 2026 14:51
@Rocketknight1 Rocketknight1 marked this pull request as ready for review July 14, 2026 14:57
@Rocketknight1

Rocketknight1 commented Jul 14, 2026

Copy link
Copy Markdown
Member Author

Should be ready for review! This touches the serving code a bit so cc @SunMarc @remi-or @LysandreJik. Other than that it's mostly mechanical changes and deleting references/imports, plus updating the Gemma4 conversion scripts to only add new-style response_template, so it should be a pretty quick review

🚨 Don't merge it yet, though - slow tests for Gemma4 will break until we've merged the PRs to update the model repos too

@github-actions

Copy link
Copy Markdown
Contributor

CI recap

Dashboard: View test results in Grafana
Latest run: 29343113953:1
Result: success | Jobs: 15 | Tests: 165,327 | Failures: 0 | Duration: 14h 27m

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.

2 participants