Skip to content

fix: resolve duplicate model constructor options - #1538

Open
pcbeingused33 wants to merge 1 commit into
dataease:mainfrom
pcbeingused33:fix/model-streaming-options
Open

pcbeingused33 wants to merge 1 commit into
dataease:mainfrom
pcbeingused33:fix/model-streaming-options

Conversation

@pcbeingused33

Copy link
Copy Markdown
Contributor

Follow-up to #1447: validation now keeps false values, so the stream_usage: false example 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_usage for OpenAI or streaming for vLLM, the constructor receives the same keyword twice and raises TypeError before 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

This branch has not been deployed

No deployments
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