mirror of
https://github.com/hwchase17/langchain.git
synced 2026-06-09 10:17:00 +00:00
test(standard-tests): assert ls_model_name honors per-call model override (#37504)
Adds a standard unit test so every chat-model integration verifies that `_get_ls_params` picks up a runtime `model` kwarg instead of always reporting the constructor default.
This commit is contained in:
@@ -749,7 +749,10 @@ class AzureChatOpenAI(BaseChatOpenAI):
|
||||
"""Get the parameters used to invoke the model."""
|
||||
params = super()._get_ls_params(stop=stop, **kwargs)
|
||||
params["ls_provider"] = "azure"
|
||||
if self.model_name:
|
||||
if "model" in kwargs:
|
||||
# Honor explicit per-call override resolved by super().
|
||||
pass
|
||||
elif self.model_name:
|
||||
if self.model_version and self.model_version not in self.model_name:
|
||||
params["ls_model_name"] = (
|
||||
self.model_name + "-" + self.model_version.lstrip("-")
|
||||
|
||||
Reference in New Issue
Block a user