Repository navigation
fix: resolve duplicate model constructor options - #1538
Open
pcbeingused33 wants to merge 1 commit into
Open
pcbeingused33 wants to merge 1 commit into
pcbeingused33 wants to merge 1 commit into
Conversation
This branch has not been 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.
Follow-up to #1447: validation now keeps
falsevalues, so thestream_usage: falseexample from #1446 reaches the OpenAI adapter and fails there instead of being validated.Model validation and chat share OpenAI and vLLM adapter construction. When advanced settings include
stream_usagefor OpenAI orstreamingfor vLLM, the constructor receives the same keyword twice and raisesTypeErrorbefore contacting the provider.Build one options dictionary per adapter. The adapter's model, credentials, endpoint, and streaming settings take precedence over matching advanced settings. Other advanced options, including
temperature=0, still reach the constructor.Testing
The offline regression runs the validation handler and model factory with simulated provider constructors. Both new cases fail on main with duplicate keyword errors. All 20 focused tests pass with the patch. Coverage is limited to the handler and factory with simulated providers.
cd backend python -m pytest -q tests/test_model_validation_parameters.py