Repository navigation
Python: Send the NVIDIA nvext setting in extra_body - #14698
Open
Ali Zulfiqar (codewithfourtix) wants to merge 1 commit into
Open
Ali Zulfiqar (codewithfourtix) wants to merge 1 commit into
Ali Zulfiqar (codewithfourtix) wants to merge 1 commit into
Conversation
NvidiaChatPromptExecutionSettings.nvext was dumped as a top-level argument of chat.completions.create(), which rejects it with a TypeError, so every request that set nvext failed. Move it into extra_body and merge it with the guided_json that response_format puts there, and drop the handler's copy of extra_body["nvext"], which would overwrite the merged value.
Ali Zulfiqar (codewithfourtix)
requested a review
from a team
as a code owner
October 31, 2026 11:02
Ali Zulfiqar (codewithfourtix)
deployed
to
github-app-auth
October 31, 2026 11:02 — with
GitHub Actions
Active
This branch was successfully deployed
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.
Motivation and Context
NvidiaChatPromptExecutionSettings.nvextis dumped as a top-level argument ofchat.completions.create(), so every request that sets it fails:Description
prepare_settings_dict()now sendsnvextinextra_body, merged with theguided_jsonthatresponse_formatputs there. On a key clash,extra_body["nvext"]wins.extra_body["nvext"].model_dump()already includesextra_body, and the copy would overwrite the merged value.create()with a plainAsyncMock, which accepts any keyword, so they could not catch this.Contribution Checklist