Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-langchain-openai for
openSUSE:Factory checked in at 2026-09-22 21:58:33
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-langchain-openai (Old)
and /work/SRC/openSUSE:Factory/.python-langchain-openai.new.383539 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-langchain-openai"
Tue Sep 22 21:58:33 2026 rev:13 rq:1379739 version:1.6.3
Changes:
--------
---
/work/SRC/openSUSE:Factory/python-langchain-openai/python-langchain-openai.changes
2026-09-10 17:41:19.788545776 +0200
+++
/work/SRC/openSUSE:Factory/.python-langchain-openai.new.383539/python-langchain-openai.changes
2026-09-22 21:58:35.431507076 +0200
@@ -1,0 +2,14 @@
+Tue Sep 22 17:12:14 UTC 2026 - Martin Pluskal <[email protected]>
+
+- Update to 1.6.3:
+ * Token counting recognises the gpt-6 model family, selecting
+ the o200k_base encoding and the same per-message overhead
+ already used for gpt-5
+ * A gpt-6 model invoked with tools is routed through the
+ Responses API
+ * use_responses_api is resolved when the model is constructed,
+ so it reads True whenever the instance settings already force
+ the Responses API instead of staying None
+- Raise the langchain-core requirement to 1.6.4, as upstream does
+
+-------------------------------------------------------------------
Old:
----
langchain_openai-1.6.2.tar.gz
New:
----
langchain_openai-1.6.3.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-langchain-openai.spec ++++++
--- /var/tmp/diff_new_pack.0G9Kdk/_old 2026-09-22 21:58:36.282542759 +0200
+++ /var/tmp/diff_new_pack.0G9Kdk/_new 2026-09-22 21:58:36.284542842 +0200
@@ -17,7 +17,7 @@
Name: python-langchain-openai
-Version: 1.6.2
+Version: 1.6.3
Release: 0
Summary: An integration package connecting OpenAI and LangChain
License: MIT
@@ -28,7 +28,7 @@
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-certifi >= 2024.6.2
-Requires: python-langchain-core >= 1.6.2
+Requires: python-langchain-core >= 1.6.4
Requires: python-openai >= 2.45.0
Requires: python-tiktoken >= 0.7.0
BuildArch: noarch
@@ -36,7 +36,7 @@
BuildRequires: %{python_module certifi >= 2024.6.2}
BuildRequires: %{python_module httpx2}
BuildRequires: %{python_module httpx}
-BuildRequires: %{python_module langchain-core >= 1.6.2}
+BuildRequires: %{python_module langchain-core >= 1.6.4}
BuildRequires: %{python_module openai >= 2.45.0}
BuildRequires: %{python_module pytest-asyncio}
BuildRequires: %{python_module tiktoken >= 0.7.0}
++++++ langchain_openai-1.6.2.tar.gz -> langchain_openai-1.6.3.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/langchain_openai-1.6.2/PKG-INFO
new/langchain_openai-1.6.3/PKG-INFO
--- old/langchain_openai-1.6.2/PKG-INFO 2020-02-02 01:00:00.000000000 +0100
+++ new/langchain_openai-1.6.3/PKG-INFO 2020-02-02 01:00:00.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 2.5
Name: langchain-openai
-Version: 1.6.2
+Version: 1.6.3
Summary: An integration package connecting OpenAI and LangChain
Project-URL: Homepage,
https://docs.langchain.com/oss/python/integrations/providers/openai
Project-URL: Documentation,
https://reference.langchain.com/python/integrations/langchain_openai/
@@ -24,7 +24,7 @@
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: <4.0.0,>=3.10.0
Requires-Dist: certifi>=2024.6.2
-Requires-Dist: langchain-core<2.0.0,>=1.6.2
+Requires-Dist: langchain-core<2.0.0,>=1.6.4
Requires-Dist: openai<4.0.0,>=2.45.0
Requires-Dist: tiktoken<1.0.0,>=0.7.0
Description-Content-Type: text/markdown
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/langchain_openai-1.6.2/langchain_openai/_version.py
new/langchain_openai-1.6.3/langchain_openai/_version.py
--- old/langchain_openai-1.6.2/langchain_openai/_version.py 2020-02-02
01:00:00.000000000 +0100
+++ new/langchain_openai-1.6.3/langchain_openai/_version.py 2020-02-02
01:00:00.000000000 +0100
@@ -1,3 +1,3 @@
"""Version information for `langchain-openai`."""
-__version__ = "1.6.2"
+__version__ = "1.6.3"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/langchain_openai-1.6.2/langchain_openai/chat_models/base.py
new/langchain_openai-1.6.3/langchain_openai/chat_models/base.py
--- old/langchain_openai-1.6.2/langchain_openai/chat_models/base.py
2020-02-02 01:00:00.000000000 +0100
+++ new/langchain_openai-1.6.3/langchain_openai/chat_models/base.py
2020-02-02 01:00:00.000000000 +0100
@@ -1206,7 +1206,7 @@
use_responses_api: bool | None = None
"""Whether to use the Responses API instead of the Chat API.
- If not specified then will be inferred based on invocation params.
+ If not specified, set to `True` when instance settings require the
Responses API,
!!! version-added "Added in `langchain-openai` 0.3.9"
"""
@@ -1326,6 +1326,13 @@
return self
@model_validator(mode="after")
+ def _infer_use_responses_api(self) -> Self:
+ """Expose unconditional instance-level Responses API routing."""
+ if self.use_responses_api is None and self._use_responses_api({}):
+ self.use_responses_api = True
+ return self
+
+ @model_validator(mode="after")
def validate_environment(self) -> Self:
"""Validate that api key and python package exists in environment."""
if self.n is not None and self.n < 1:
@@ -1932,6 +1939,10 @@
or self.truncation is not None
or self.use_previous_response_id
or _model_prefers_responses_api(self.model_name)
+ or (
+ (self.model_name or "").lower().startswith("gpt-6")
+ and payload.get("tools")
+ )
):
return True
return _use_responses_api(payload)
@@ -2295,7 +2306,7 @@
except KeyError:
model_lower = model.lower()
encoder = "cl100k_base"
- if model_lower.startswith(("gpt-4o", "gpt-4.1", "gpt-5")):
+ if model_lower.startswith(("gpt-4o", "gpt-4.1", "gpt-5", "gpt-6")):
encoder = "o200k_base"
encoding = tiktoken.get_encoding(encoder)
return model, encoding
@@ -2346,7 +2357,9 @@
tokens_per_message = 4
# if there's a name, the role is omitted
tokens_per_name = -1
- elif model.startswith(("gpt-3.5-turbo", "gpt-4", "gpt-5", "o1", "o3",
"o4")):
+ elif model.startswith(
+ ("gpt-3.5-turbo", "gpt-4", "gpt-5", "gpt-6", "o1", "o3", "o4")
+ ):
tokens_per_message = 3
tokens_per_name = 1
else:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/langchain_openai-1.6.2/pyproject.toml
new/langchain_openai-1.6.3/pyproject.toml
--- old/langchain_openai-1.6.2/pyproject.toml 2020-02-02 01:00:00.000000000
+0100
+++ new/langchain_openai-1.6.3/pyproject.toml 2020-02-02 01:00:00.000000000
+0100
@@ -20,10 +20,10 @@
"Topic :: Scientific/Engineering :: Artificial Intelligence",
]
-version = "1.6.2"
+version = "1.6.3"
requires-python = ">=3.10.0,<4.0.0"
dependencies = [
- "langchain-core>=1.6.2,<2.0.0",
+ "langchain-core>=1.6.4,<2.0.0",
"certifi>=2024.6.2",
"openai>=2.45.0,<4.0.0",
"tiktoken>=0.7.0,<1.0.0",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/langchain_openai-1.6.2/tests/unit_tests/chat_models/test_base.py
new/langchain_openai-1.6.3/tests/unit_tests/chat_models/test_base.py
--- old/langchain_openai-1.6.2/tests/unit_tests/chat_models/test_base.py
2020-02-02 01:00:00.000000000 +0100
+++ new/langchain_openai-1.6.3/tests/unit_tests/chat_models/test_base.py
2020-02-02 01:00:00.000000000 +0100
@@ -1318,6 +1318,14 @@
assert actual == expected
+def test_get_num_tokens_from_messages_gpt_6() -> None:
+ llm = ChatOpenAI(model="gpt-6-astra")
+ messages = [HumanMessage("how are you")]
+
+ assert llm._get_encoding_model()[1].name == "o200k_base"
+ assert llm.get_num_tokens_from_messages(messages) > 0
+
+
class Foo(BaseModel):
bar: int
@@ -4585,6 +4593,89 @@
assert payload["temperature"] == 0.7
[email protected](
+ "kwargs",
+ [
+ {"output_version": "responses/v1"},
+ {"context_management": []},
+ {"include": []},
+ {"reasoning": {}},
+ {"truncation": "auto"},
+ {"use_previous_response_id": True},
+ {"model": "gpt-5-pro"},
+ {"model": "gpt-5.3-codex"},
+ ],
+)
[email protected]("explicit", [None, True, False])
+def test_infer_use_responses_api(kwargs: dict, explicit: bool | None) -> None:
+ llm = ChatOpenAI(**kwargs, use_responses_api=explicit)
+ expected = explicit if explicit is not None else True
+ assert llm.use_responses_api is expected
+ assert llm._use_responses_api({}) is expected
+
+
[email protected](
+ "kwargs",
+ [
+ {},
+ {"output_version": "v1"},
+ {"reasoning_effort": "low"},
+ {"model": "gpt-6-astra"},
+ {"model_kwargs": {"text": {}}},
+ {"model_kwargs": {"tools": [{"type": "web_search"}]}},
+ ],
+)
+def test_infer_use_responses_api_remains_dynamic(kwargs: dict) -> None:
+ llm = ChatOpenAI(**kwargs)
+ assert llm.use_responses_api is None
+ assert llm._use_responses_api({"tools": [{"type": "web_search"}]})
+ assert llm._use_responses_api({"text": {}})
+ assert not llm._use_responses_api({})
+
+
+def test_infer_use_responses_api_from_output_version_env(
+ monkeypatch: pytest.MonkeyPatch,
+) -> None:
+ monkeypatch.setenv("LC_OUTPUT_VERSION", "responses/v1")
+ assert ChatOpenAI().use_responses_api is True
+
+
+def test_inferred_responses_api_bind_tools_strict() -> None:
+ llm = ChatOpenAI(reasoning={})
+ tool = {
+ "type": "function",
+ "function": {
+ "name": "get_weather",
+ "parameters": {"type": "object", "properties": {}},
+ },
+ }
+ bound = llm.bind_tools(
+ [tool],
+ response_format={"title": "Weather", "type": "object", "properties":
{}},
+ )
+ assert isinstance(bound, RunnableBinding)
+ assert "strict" not in bound.kwargs["tools"][0]["function"]
+
+
+def test_gpt_6_tools_use_responses_api() -> None:
+ llm = ChatOpenAI(model="gpt-6-astra")
+ tools = [
+ {
+ "type": "function",
+ "function": {
+ "name": "get_weather",
+ "description": "Get the weather",
+ "parameters": {"type": "object", "properties": {}},
+ },
+ }
+ ]
+
+ payload = llm._get_request_payload([HumanMessage(content="Hello")],
tools=tools)
+
+ assert "input" in payload
+ assert "messages" not in payload
+
+
@pytest.mark.parametrize("use_responses_api", [False, True])
def test_gpt_5_1_temperature_with_reasoning_effort_none(
use_responses_api: bool,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/langchain_openai-1.6.2/uv.lock
new/langchain_openai-1.6.3/uv.lock
--- old/langchain_openai-1.6.2/uv.lock 2020-02-02 01:00:00.000000000 +0100
+++ new/langchain_openai-1.6.3/uv.lock 2020-02-02 01:00:00.000000000 +0100
@@ -31,17 +31,16 @@
[[package]]
name = "anyio"
-version = "4.11.0"
+version = "4.14.2"
source = { registry = "https://pypi.org/simple" }
dependencies = [
{ name = "exceptiongroup", marker = "python_full_version < '3.11'" },
{ name = "idna" },
- { name = "sniffio" },
{ name = "typing-extensions", marker = "python_full_version < '3.13'" },
]
-sdist = { url =
"https://files.pythonhosted.org/packages/c6/78/7d432127c41b50bccba979505f272c16cbcadcc33645d5fa3a738110ae75/anyio-4.11.0.tar.gz",
hash =
"sha256:82a8d0b81e318cc5ce71a5f1f8b5c4e63619620b63141ef8c995fa0db95a57c4", size
= 219094, upload-time = "2025-09-23T09:19:12.58Z" }
+sdist = { url =
"https://files.pythonhosted.org/packages/61/cc/a381afa6efea9f496eff839d4a6a1aed3bfafc7b3ab4b0d1b243a12573dd/anyio-4.14.2.tar.gz",
hash =
"sha256:cfa139f3ed1a23ee8f88a145ddb5ac7605b8bbfd8592baacd7ce3d8bb4313c7f", size
= 260176, upload-time = "2026-07-12T20:29:07.082Z" }
wheels = [
- { url =
"https://files.pythonhosted.org/packages/15/b3/9b1a8074496371342ec1e796a96f99c82c945a339cd81a8e73de28b4cf9e/anyio-4.11.0-py3-none-any.whl",
hash =
"sha256:0287e96f4d26d4149305414d4e3bc32f0dcd0862365a4bddea19d7a1ec38c4fc", size
= 109097, upload-time = "2025-09-23T09:19:10.601Z" },
+ { url =
"https://files.pythonhosted.org/packages/da/35/f2287558c17e29fafc8ef3daf819bb9834061cfa43bff8014f7df7f63bdc/anyio-4.14.2-py3-none-any.whl",
hash =
"sha256:9f505dda5ac9f0c8309b5e8bd445a8c2bf7246f3ce950121e45ea15bc41d1494", size
= 125813, upload-time = "2026-07-12T20:29:05.763Z" },
]
[[package]]
@@ -391,7 +390,7 @@
version = "1.3.0"
source = { registry = "https://pypi.org/simple" }
dependencies = [
- { name = "typing-extensions" },
+ { name = "typing-extensions", marker = "python_full_version < '3.11'" },
]
sdist = { url =
"https://files.pythonhosted.org/packages/0b/9f/a65090624ecf468cdca03533906e7c69ed7588582240cfe7cc9e770b50eb/exceptiongroup-1.3.0.tar.gz",
hash =
"sha256:b241f5885f560bc56a59ee63ca4c6a8bfa46ae4ad651af316d4e81817bb9fd88", size
= 29749, upload-time = "2025-05-10T17:42:51.123Z" }
wheels = [
@@ -446,8 +445,8 @@
version = "2.12.0"
source = { registry = "https://pypi.org/simple" }
dependencies = [
- { name = "h11" },
- { name = "truststore" },
+ { name = "h11", marker = "python_full_version != '3.12.*' or sys_platform
!= 'emscripten'" },
+ { name = "truststore", marker = "python_full_version != '3.12.*' or
sys_platform != 'emscripten'" },
]
sdist = { url =
"https://files.pythonhosted.org/packages/be/ad/f4f0e57345f1870f3e8cb624e058d7eca6e5a27d33bcc3311d9b618734cd/httpcore2-2.12.0.tar.gz",
hash =
"sha256:9293522bba0aa7c4c8e9e3f040c16575bd8868e155a77fa30c7a9085a5eae648", size
= 67548, upload-time = "2026-08-18T13:22:08.211Z" }
wheels = [
@@ -635,7 +634,7 @@
[[package]]
name = "langchain"
-version = "1.4.0"
+version = "1.4.2"
source = { editable = "../../langchain_v1" }
dependencies = [
{ name = "langchain-core" },
@@ -703,7 +702,7 @@
[[package]]
name = "langchain-core"
-version = "1.6.2"
+version = "1.6.4"
source = { editable = "../../core" }
dependencies = [
{ name = "httpx" },
@@ -767,7 +766,7 @@
[[package]]
name = "langchain-openai"
-version = "1.6.2"
+version = "1.6.3"
source = { editable = "." }
dependencies = [
{ name = "certifi" },