fix(title): retry title generation without json_schema response_format when the provider rejects it - #93726
Closed
ZLF0621 wants to merge 1 commit into
Closed
fix(title): retry title generation without json_schema response_format when the provider rejects it#93726ZLF0621 wants to merge 1 commit into
ZLF0621 wants to merge 1 commit into
Conversation
…t when the provider rejects it
Some OpenAI-compatible providers (notably DeepSeek) do not implement the
json_schema response_format type and reject the request with HTTP 400
("This response_format type is unavailable now"). Titling then fails
silently and the session is left with the derived title.
Retry once without the schema when the error mentions response_format or
"unavailable". The prompt still demands JSON-only output, and the
existing loose JSON scan falls back to first-line prose for anything
non-compliant.
Refs: #83390
Collaborator
|
Thanks @ZLF0621 for working on the json_schema retry. This landed on main through #89589 and #113966 (5cc8177), which covers the same symptom on the primary and fallback auxiliary paths and omits the field up front for providers known to reject it. Closing as superseded by the landed fix — the tracking issue (#83390 cluster) is closed with the same references. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Some OpenAI-compatible providers (notably DeepSeek) do not implement the
json_schemaresponse_format type and reject the request with HTTP 400 ("This response_format type is unavailable now"). Titling then fails silently and the session keeps the derived (un-upgraded) title. Reported in #83390.Fix
Wrap the title-generation call and retry once without the
json_schemaresponse_format when the error mentionsresponse_formator "unavailable". The prompt still demands JSON-only output, and the existing loose JSON scan in_extract_title_textfalls back to first-line prose for anything non-compliant.Validation