fix(standard-tests,openai): minor fix for Responses API tests (#33315)

Following https://github.com/langchain-ai/langchain/pull/33301
This commit is contained in:
ccurme
2025-10-06 16:46:41 -04:00
committed by GitHub
parent e8e41bd7a6
commit d0f5a1cc96
2 changed files with 4 additions and 4 deletions

View File

@@ -22,7 +22,7 @@ class TestOpenAIResponses(TestOpenAIStandard):
@property @property
def chat_model_params(self) -> dict: def chat_model_params(self) -> dict:
return {"model": "gpt-4o-mini", "output_version": "responses/v1"} return {"model": "gpt-4o-mini", "use_responses_api": True}
@property @property
def supports_image_tool_message(self) -> bool: def supports_image_tool_message(self) -> bool:
@@ -40,7 +40,7 @@ class TestOpenAIResponses(TestOpenAIStandard):
{readme} {readme}
""" """
llm = ChatOpenAI(model="gpt-4.1-mini", output_version="responses/v1") llm = ChatOpenAI(model="gpt-4.1-mini", use_responses_api=True)
_invoke(llm, input_, stream) _invoke(llm, input_, stream)
# invoke twice so first invocation is cached # invoke twice so first invocation is cached
return _invoke(llm, input_, stream) return _invoke(llm, input_, stream)
@@ -49,7 +49,7 @@ class TestOpenAIResponses(TestOpenAIStandard):
llm = ChatOpenAI( llm = ChatOpenAI(
model="o4-mini", model="o4-mini",
reasoning={"effort": "medium", "summary": "auto"}, reasoning={"effort": "medium", "summary": "auto"},
output_version="responses/v1", use_responses_api=True,
) )
input_ = "What was the 3rd highest building in 2000?" input_ = "What was the 3rd highest building in 2000?"
return _invoke(llm, input_, stream) return _invoke(llm, input_, stream)

View File

@@ -90,8 +90,8 @@ class ChatModelTests(BaseStandardTests):
**{ **{
**self.standard_chat_model_params, **self.standard_chat_model_params,
**self.chat_model_params, **self.chat_model_params,
**extra_init_params,
}, },
**extra_init_params,
) )
@pytest.fixture @pytest.fixture