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-07-26 11:30:02
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-langchain-openai (Old)
and /work/SRC/openSUSE:Factory/.python-langchain-openai.new.2004 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-langchain-openai"
Sun Jul 26 11:30:02 2026 rev:5 rq:1367771 version:1.4.1
Changes:
--------
---
/work/SRC/openSUSE:Factory/python-langchain-openai/python-langchain-openai.changes
2026-07-22 19:08:46.716607026 +0200
+++
/work/SRC/openSUSE:Factory/.python-langchain-openai.new.2004/python-langchain-openai.changes
2026-07-26 11:32:39.047346139 +0200
@@ -1,0 +2,10 @@
+Sat Jul 25 19:03:50 UTC 2026 - Martin Pluskal <[email protected]>
+
+- Update to version 1.4.1:
+ * Support the langsmith gateway through an environment
+ variable
+ * Correct the gpt-5.3-chat-latest model profile
+- Raise the langchain-core floor to 1.5.1, following upstream
+ requires
+
+-------------------------------------------------------------------
Old:
----
langchain_openai-1.4.0.tar.gz
New:
----
langchain_openai-1.4.1.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-langchain-openai.spec ++++++
--- /var/tmp/diff_new_pack.dgD3Zg/_old 2026-07-26 11:32:39.535362952 +0200
+++ /var/tmp/diff_new_pack.dgD3Zg/_new 2026-07-26 11:32:39.535362952 +0200
@@ -17,7 +17,7 @@
Name: python-langchain-openai
-Version: 1.4.0
+Version: 1.4.1
Release: 0
Summary: An integration package connecting OpenAI and LangChain
License: MIT
@@ -27,7 +27,7 @@
BuildRequires: %{python_module pip}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
-Requires: python-langchain-core >= 1.5.0
+Requires: python-langchain-core >= 1.5.1
Requires: python-openai >= 2.45.0
Requires: python-tiktoken >= 0.7.0
BuildArch: noarch
++++++ langchain_openai-1.4.0.tar.gz -> langchain_openai-1.4.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/langchain_openai-1.4.0/PKG-INFO
new/langchain_openai-1.4.1/PKG-INFO
--- old/langchain_openai-1.4.0/PKG-INFO 2020-02-02 01:00:00.000000000 +0100
+++ new/langchain_openai-1.4.1/PKG-INFO 2020-02-02 01:00:00.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 2.4
Name: langchain-openai
-Version: 1.4.0
+Version: 1.4.1
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/
@@ -23,7 +23,7 @@
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: <4.0.0,>=3.10.0
-Requires-Dist: langchain-core<2.0.0,>=1.5.0
+Requires-Dist: langchain-core<2.0.0,>=1.5.1
Requires-Dist: openai<3.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.4.0/langchain_openai/_version.py
new/langchain_openai-1.4.1/langchain_openai/_version.py
--- old/langchain_openai-1.4.0/langchain_openai/_version.py 2020-02-02
01:00:00.000000000 +0100
+++ new/langchain_openai-1.4.1/langchain_openai/_version.py 2020-02-02
01:00:00.000000000 +0100
@@ -1,3 +1,3 @@
"""Version information for `langchain-openai`."""
-__version__ = "1.4.0"
+__version__ = "1.4.1"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/langchain_openai-1.4.0/langchain_openai/chat_models/base.py
new/langchain_openai-1.4.1/langchain_openai/chat_models/base.py
--- old/langchain_openai-1.4.0/langchain_openai/chat_models/base.py
2020-02-02 01:00:00.000000000 +0100
+++ new/langchain_openai-1.4.1/langchain_openai/chat_models/base.py
2020-02-02 01:00:00.000000000 +0100
@@ -108,6 +108,7 @@
from langchain_core.tools import BaseTool
from langchain_core.tools.base import _stringify
from langchain_core.utils import get_pydantic_field_names
+from langchain_core.utils._gateway import _resolve_gateway_config
from langchain_core.utils.function_calling import (
convert_to_openai_function,
convert_to_openai_tool,
@@ -117,7 +118,7 @@
TypeBaseModel,
is_basemodel_subclass,
)
-from langchain_core.utils.utils import _build_model_kwargs, from_env,
secret_from_env
+from langchain_core.utils.utils import _build_model_kwargs, from_env
from pydantic import (
BaseModel,
ConfigDict,
@@ -648,9 +649,7 @@
openai_api_key: (
SecretStr | None | Callable[[], str] | Callable[[], Awaitable[str]]
- ) = Field(
- alias="api_key", default_factory=secret_from_env("OPENAI_API_KEY",
default=None)
- )
+ ) = Field(alias="api_key", default=None)
"""API key to use.
Can be inferred from the `OPENAI_API_KEY` environment variable, or
specified
@@ -1212,26 +1211,36 @@
or os.getenv("OPENAI_ORG_ID")
or os.getenv("OPENAI_ORGANIZATION")
)
- self.openai_api_base = self.openai_api_base or
os.getenv("OPENAI_API_BASE")
-
- # Enable stream_usage by default if using default base URL and client
- if (
- all(
- getattr(self, key, None) is None
- for key in (
- "stream_usage",
- "openai_proxy",
- "openai_api_base",
- "base_url",
- "client",
- "root_client",
- "async_client",
- "root_async_client",
- "http_client",
- "http_async_client",
- )
+ # Resolve base URL and API key, applying LangSmith gateway settings.
+ _gateway_config = _resolve_gateway_config(
+ base_url=self.openai_api_base,
+ api_key=self.openai_api_key,
+ provider_path="openai/v1",
+ base_url_env="OPENAI_API_BASE",
+ api_key_env="OPENAI_API_KEY",
+ )
+ self.openai_api_base = _gateway_config.base_url
+ self.openai_api_key = _gateway_config.api_key
+ _base_url_from_gateway = _gateway_config.base_url_from_gateway
+
+ # Enable stream_usage by default if using default base URL and client,
+ # or when the base URL was set by the LangSmith gateway (which proxies
+ # to OpenAI and supports streaming token usage).
+ if all(
+ getattr(self, key, None) is None
+ for key in (
+ "stream_usage",
+ "openai_proxy",
+ "client",
+ "root_client",
+ "async_client",
+ "root_async_client",
+ "http_client",
+ "http_async_client",
)
- and "OPENAI_BASE_URL" not in os.environ
+ ) and (
+ _base_url_from_gateway
+ or (self.openai_api_base is None and "OPENAI_BASE_URL" not in
os.environ)
):
self.stream_usage = True
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/langchain_openai-1.4.0/langchain_openai/data/_profiles.py
new/langchain_openai-1.4.1/langchain_openai/data/_profiles.py
--- old/langchain_openai-1.4.0/langchain_openai/data/_profiles.py
2020-02-02 01:00:00.000000000 +0100
+++ new/langchain_openai-1.4.1/langchain_openai/data/_profiles.py
2020-02-02 01:00:00.000000000 +0100
@@ -875,13 +875,6 @@
"image_tool_message": True,
"tool_choice": True,
"tool_call_streaming": True,
- "reasoning_effort_levels": [
- "none",
- "low",
- "medium",
- "high",
- "xhigh",
- ],
},
"gpt-5.3-codex": {
"name": "GPT-5.3 Codex",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/langchain_openai-1.4.0/langchain_openai/data/profile_augmentations.toml
new/langchain_openai-1.4.1/langchain_openai/data/profile_augmentations.toml
--- old/langchain_openai-1.4.0/langchain_openai/data/profile_augmentations.toml
2020-02-02 01:00:00.000000000 +0100
+++ new/langchain_openai-1.4.1/langchain_openai/data/profile_augmentations.toml
2020-02-02 01:00:00.000000000 +0100
@@ -73,9 +73,6 @@
[overrides."gpt-5.2-codex"]
reasoning_effort_levels = ["none", "low", "medium", "high", "xhigh"]
-[overrides."gpt-5.3-chat-latest"]
-reasoning_effort_levels = ["none", "low", "medium", "high", "xhigh"]
-
[overrides."gpt-5.3-codex"]
reasoning_effort_levels = ["none", "low", "medium", "high", "xhigh"]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/langchain_openai-1.4.0/pyproject.toml
new/langchain_openai-1.4.1/pyproject.toml
--- old/langchain_openai-1.4.0/pyproject.toml 2020-02-02 01:00:00.000000000
+0100
+++ new/langchain_openai-1.4.1/pyproject.toml 2020-02-02 01:00:00.000000000
+0100
@@ -20,10 +20,10 @@
"Topic :: Scientific/Engineering :: Artificial Intelligence",
]
-version = "1.4.0"
+version = "1.4.1"
requires-python = ">=3.10.0,<4.0.0"
dependencies = [
- "langchain-core>=1.5.0,<2.0.0",
+ "langchain-core>=1.5.1,<2.0.0",
"openai>=2.45.0,<3.0.0",
"tiktoken>=0.7.0,<1.0.0",
]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/langchain_openai-1.4.0/tests/unit_tests/chat_models/test_base.py
new/langchain_openai-1.4.1/tests/unit_tests/chat_models/test_base.py
--- old/langchain_openai-1.4.0/tests/unit_tests/chat_models/test_base.py
2020-02-02 01:00:00.000000000 +0100
+++ new/langchain_openai-1.4.1/tests/unit_tests/chat_models/test_base.py
2020-02-02 01:00:00.000000000 +0100
@@ -167,6 +167,14 @@
assert model.profile["max_input_tokens"] == 272_000
+def test_gpt_5_3_chat_latest_profile_has_no_reasoning_effort() -> None:
+ model = ChatOpenAI(model="gpt-5.3-chat-latest")
+
+ assert model.profile
+ assert model.profile["reasoning_output"] is False
+ assert "reasoning_effort_levels" not in model.profile
+
+
def test_function_message_dict_to_function_message() -> None:
content = json.dumps({"result": "Example #1"})
name = "test_function"
@@ -4682,3 +4690,84 @@
assert weather_tool["defer_loading"] is True
assert weather_tool["type"] == "function"
assert {"type": "tool_search"} in result["tools"]
+
+
+def test_langsmith_gateway_true(monkeypatch: pytest.MonkeyPatch) -> None:
+ monkeypatch.setenv("LANGSMITH_GATEWAY", "true")
+ llm = ChatOpenAI(model=OPENAI_TEST_MODEL, api_key=SecretStr("test"))
+ assert llm.openai_api_base ==
"https://gateway.smith.langchain.com/openai/v1"
+ assert llm.stream_usage is True
+
+
+def test_langsmith_gateway_false(monkeypatch: pytest.MonkeyPatch) -> None:
+ monkeypatch.setenv("LANGSMITH_GATEWAY", "false")
+ llm = ChatOpenAI(model=OPENAI_TEST_MODEL, api_key=SecretStr("test"))
+ assert llm.openai_api_base is None
+
+
+def test_langsmith_gateway_unset(monkeypatch: pytest.MonkeyPatch) -> None:
+ monkeypatch.delenv("LANGSMITH_GATEWAY", raising=False)
+ llm = ChatOpenAI(model=OPENAI_TEST_MODEL, api_key=SecretStr("test"))
+ assert llm.openai_api_base is None
+
+
+def test_langsmith_gateway_custom_url(monkeypatch: pytest.MonkeyPatch) -> None:
+ monkeypatch.setenv("LANGSMITH_GATEWAY", "https://my-gateway.example.com/")
+ llm = ChatOpenAI(model=OPENAI_TEST_MODEL, api_key=SecretStr("test"))
+ assert llm.openai_api_base == "https://my-gateway.example.com/openai/v1"
+
+
+def test_langsmith_gateway_provider_env_overrides_gateway(
+ monkeypatch: pytest.MonkeyPatch,
+) -> None:
+ monkeypatch.setenv("LANGSMITH_GATEWAY", "true")
+ monkeypatch.setenv("OPENAI_API_BASE", "https://api.openai.com/v1")
+ llm = ChatOpenAI(model=OPENAI_TEST_MODEL, api_key=SecretStr("test"))
+ assert llm.openai_api_base == "https://api.openai.com/v1"
+
+
+def test_langsmith_gateway_api_key(monkeypatch: pytest.MonkeyPatch) -> None:
+ monkeypatch.setenv("LANGSMITH_GATEWAY", "true")
+ monkeypatch.setenv("LANGSMITH_GATEWAY_API_KEY", "gateway-key")
+ monkeypatch.delenv("OPENAI_API_KEY", raising=False)
+ llm = ChatOpenAI(model=OPENAI_TEST_MODEL)
+ assert isinstance(llm.openai_api_key, SecretStr)
+ assert llm.openai_api_key.get_secret_value() == "gateway-key"
+
+
+def test_langsmith_gateway_api_key_not_used_without_gateway(
+ monkeypatch: pytest.MonkeyPatch,
+) -> None:
+ monkeypatch.delenv("LANGSMITH_GATEWAY", raising=False)
+ monkeypatch.setenv("LANGSMITH_GATEWAY_API_KEY", "gateway-key")
+ monkeypatch.setenv("OPENAI_API_KEY", "provider-key")
+ llm = ChatOpenAI(model=OPENAI_TEST_MODEL)
+ assert isinstance(llm.openai_api_key, SecretStr)
+ assert llm.openai_api_key.get_secret_value() == "provider-key"
+
+
+def test_langsmith_gateway_api_key_overrides_provider_key(
+ monkeypatch: pytest.MonkeyPatch,
+) -> None:
+ monkeypatch.setenv("LANGSMITH_GATEWAY", "true")
+ monkeypatch.setenv("LANGSMITH_GATEWAY_API_KEY", "gateway-key")
+ monkeypatch.setenv("OPENAI_API_KEY", "provider-key")
+ llm = ChatOpenAI(model=OPENAI_TEST_MODEL)
+ assert isinstance(llm.openai_api_key, SecretStr)
+ assert llm.openai_api_key.get_secret_value() == "gateway-key"
+
+
+def test_langsmith_gateway_provider_base_url_uses_provider_key(
+ monkeypatch: pytest.MonkeyPatch,
+) -> None:
+ # Provider-specific wiring check: base URL overridden away from the gateway
+ # -> provider key wins over the gateway key. Full precedence matrix lives
in
+ # core's test_gateway.py.
+ monkeypatch.setenv("LANGSMITH_GATEWAY", "true")
+ monkeypatch.setenv("LANGSMITH_GATEWAY_API_KEY", "gateway-key")
+ monkeypatch.setenv("OPENAI_API_BASE", "https://api.openai.com/v1")
+ monkeypatch.setenv("OPENAI_API_KEY", "provider-key")
+ llm = ChatOpenAI(model=OPENAI_TEST_MODEL)
+ assert llm.openai_api_base == "https://api.openai.com/v1"
+ assert isinstance(llm.openai_api_key, SecretStr)
+ assert llm.openai_api_key.get_secret_value() == "provider-key"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/langchain_openai-1.4.0/uv.lock
new/langchain_openai-1.4.1/uv.lock
--- old/langchain_openai-1.4.0/uv.lock 2020-02-02 01:00:00.000000000 +0100
+++ new/langchain_openai-1.4.1/uv.lock 2020-02-02 01:00:00.000000000 +0100
@@ -728,7 +728,7 @@
[[package]]
name = "langchain-openai"
-version = "1.4.0"
+version = "1.4.1"
source = { editable = "." }
dependencies = [
{ name = "langchain-core" },