Skip to content

Commit d0f5a1c

Browse files
authored
fix(standard-tests,openai): minor fix for Responses API tests (#33315)
Following #33301
1 parent e8e41bd commit d0f5a1c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

libs/partners/openai/tests/integration_tests/chat_models/test_responses_standard.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def chat_model_class(self) -> type[BaseChatModel]:
2222

2323
@property
2424
def chat_model_params(self) -> dict:
25-
return {"model": "gpt-4o-mini", "output_version": "responses/v1"}
25+
return {"model": "gpt-4o-mini", "use_responses_api": True}
2626

2727
@property
2828
def supports_image_tool_message(self) -> bool:
@@ -40,7 +40,7 @@ def invoke_with_cache_read_input(self, *, stream: bool = False) -> AIMessage:
4040
4141
{readme}
4242
"""
43-
llm = ChatOpenAI(model="gpt-4.1-mini", output_version="responses/v1")
43+
llm = ChatOpenAI(model="gpt-4.1-mini", use_responses_api=True)
4444
_invoke(llm, input_, stream)
4545
# invoke twice so first invocation is cached
4646
return _invoke(llm, input_, stream)
@@ -49,7 +49,7 @@ def invoke_with_reasoning_output(self, *, stream: bool = False) -> AIMessage:
4949
llm = ChatOpenAI(
5050
model="o4-mini",
5151
reasoning={"effort": "medium", "summary": "auto"},
52-
output_version="responses/v1",
52+
use_responses_api=True,
5353
)
5454
input_ = "What was the 3rd highest building in 2000?"
5555
return _invoke(llm, input_, stream)

libs/standard-tests/langchain_tests/unit_tests/chat_models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,8 @@ def model(self, request: Any) -> BaseChatModel:
9090
**{
9191
**self.standard_chat_model_params,
9292
**self.chat_model_params,
93+
**extra_init_params,
9394
},
94-
**extra_init_params,
9595
)
9696

9797
@pytest.fixture

0 commit comments

Comments
 (0)