fix(openai): add model property (#35284)

This commit is contained in:
ccurme
2026-02-17 10:46:49 -05:00
committed by GitHub
parent 4150bb513f
commit 32c6ab3033
2 changed files with 7 additions and 0 deletions

View File

@@ -86,8 +86,10 @@ from langchain_openai.chat_models.base import (
def test_openai_model_param() -> None:
llm = ChatOpenAI(model="foo")
assert llm.model_name == "foo"
assert llm.model == "foo"
llm = ChatOpenAI(model_name="foo") # type: ignore[call-arg]
assert llm.model_name == "foo"
assert llm.model == "foo"
llm = ChatOpenAI(max_tokens=10) # type: ignore[call-arg]
assert llm.max_tokens == 10