Skip to content

Commit 9f2eb7f

Browse files
authored
release(openai): 1.6.1 (#40268)
1 parent 765eb32 commit 9f2eb7f

5 files changed

Lines changed: 22 additions & 5 deletions

File tree

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
"""Version information for `langchain-openai`."""
22

3-
__version__ = "1.6.0"
3+
__version__ = "1.6.1"

‎libs/partners/openai/pyproject.toml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ classifiers = [
2020
"Topic :: Scientific/Engineering :: Artificial Intelligence",
2121
]
2222

23-
version = "1.6.0"
23+
version = "1.6.1"
2424
requires-python = ">=3.10.0,<4.0.0"
2525
dependencies = [
26-
"langchain-core>=1.6.0,<2.0.0",
26+
"langchain-core>=1.6.2,<2.0.0",
2727
"certifi>=2024.6.2",
2828
"openai>=2.45.0,<4.0.0",
2929
"tiktoken>=0.7.0,<1.0.0",

‎libs/partners/openai/tests/integration_tests/chat_models/test_responses_api.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -647,6 +647,7 @@ def test_configuration_update_block() -> None:
647647
)
648648

649649

650+
@pytest.mark.skip(reason="Requires data retention.")
650651
def test_stateful_api() -> None:
651652
llm = ChatOpenAI(model=MODEL_NAME, use_responses_api=True)
652653
response = llm.invoke("how are you, my name is Bobo")

‎libs/partners/openai/tests/unit_tests/chat_models/test_base.py‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4322,6 +4322,22 @@ def test_get_request_payload_use_previous_response_id() -> None:
43224322
assert len(payload["input"]) == 1
43234323

43244324

4325+
def test_get_request_payload_explicit_previous_response_id() -> None:
4326+
"""Test that an explicit `previous_response_id` kwarg reaches the payload."""
4327+
llm = ChatOpenAI(model=OPENAI_TEST_MODEL)
4328+
messages = [
4329+
HumanMessage("Hello"),
4330+
AIMessage("Hi there!", response_metadata={"id": "resp_123"}),
4331+
HumanMessage("How are you?"),
4332+
]
4333+
payload = llm._get_request_payload(messages, previous_response_id="resp_123")
4334+
# Passing the ID engages the Responses API on its own.
4335+
assert "input" in payload
4336+
assert payload["previous_response_id"] == "resp_123"
4337+
# Unlike `use_previous_response_id`, history is not trimmed.
4338+
assert len(payload["input"]) == 3
4339+
4340+
43254341
def test_make_computer_call_output_from_message() -> None:
43264342
# List content
43274343
tool_message = ToolMessage(

‎libs/partners/openai/uv.lock‎

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)