Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-langchain-core for 
openSUSE:Factory checked in at 2026-08-01 18:32:24
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-langchain-core (Old)
 and      /work/SRC/openSUSE:Factory/.python-langchain-core.new.16738 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-langchain-core"

Sat Aug  1 18:32:24 2026 rev:6 rq:1368762 version:1.5.3

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/python-langchain-core/python-langchain-core.changes  
    2026-07-29 19:01:22.574046487 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-langchain-core.new.16738/python-langchain-core.changes
   2026-08-01 18:35:39.848913293 +0200
@@ -1,0 +2,7 @@
+Fri Jul 31 06:49:13 UTC 2026 - Martin Pluskal <[email protected]>
+
+- Update to version 1.5.3:
+  * Fall back to the LANGSMITH_API_KEY environment variable when
+    resolving credentials for the gateway
+
+-------------------------------------------------------------------

Old:
----
  langchain_core-1.5.2.tar.gz

New:
----
  langchain_core-1.5.3.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-langchain-core.spec ++++++
--- /var/tmp/diff_new_pack.xjXeYJ/_old  2026-08-01 18:35:40.776945249 +0200
+++ /var/tmp/diff_new_pack.xjXeYJ/_new  2026-08-01 18:35:40.780945387 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           python-langchain-core
-Version:        1.5.2
+Version:        1.5.3
 Release:        0
 Summary:        Building applications with LLMs through composability
 License:        MIT

++++++ langchain_core-1.5.2.tar.gz -> langchain_core-1.5.3.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/langchain_core-1.5.2/PKG-INFO 
new/langchain_core-1.5.3/PKG-INFO
--- old/langchain_core-1.5.2/PKG-INFO   2020-02-02 01:00:00.000000000 +0100
+++ new/langchain_core-1.5.3/PKG-INFO   2020-02-02 01:00:00.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 2.4
 Name: langchain-core
-Version: 1.5.2
+Version: 1.5.3
 Summary: Building applications with LLMs through composability
 Project-URL: Homepage, https://docs.langchain.com/
 Project-URL: Documentation, 
https://reference.langchain.com/python/langchain_core/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/langchain_core-1.5.2/langchain_core/utils/_gateway.py 
new/langchain_core-1.5.3/langchain_core/utils/_gateway.py
--- old/langchain_core-1.5.2/langchain_core/utils/_gateway.py   2020-02-02 
01:00:00.000000000 +0100
+++ new/langchain_core-1.5.3/langchain_core/utils/_gateway.py   2020-02-02 
01:00:00.000000000 +0100
@@ -22,6 +22,7 @@
 
 _LANGSMITH_GATEWAY_ENV = "LANGSMITH_GATEWAY"
 _LANGSMITH_GATEWAY_API_KEY_ENV = "LANGSMITH_GATEWAY_API_KEY"
+_LANGSMITH_API_KEY_ENV = "LANGSMITH_API_KEY"
 _LANGSMITH_GATEWAY_DEFAULT_BASE = "https://gateway.smith.langchain.com";
 
 _TRUE_VALUES = ("true", "1", "yes")
@@ -107,7 +108,9 @@
       > ``default_base_url``.
     - **api_key:** explicit ``api_key`` (returned unchanged) > the gateway key 
if
       the base URL came from the gateway, otherwise the provider key > the 
other.
-      The gateway key is only a candidate when the gateway is enabled.
+      The gateway key uses ``LANGSMITH_GATEWAY_API_KEY`` when the gateway is
+      enabled, with ``LANGSMITH_API_KEY`` as a fallback only when the base URL 
came
+      from the gateway.
 
     The provenance flip on the key means an ``OPENAI_API_KEY``-style provider 
key
     is preferred whenever the caller pointed the base URL at a non-gateway
@@ -151,6 +154,8 @@
             if gateway_base_url is not None
             else None
         )
+        if not gateway_api_key and base_url_from_gateway:
+            gateway_api_key = os.getenv(_LANGSMITH_API_KEY_ENV)
         provider_api_key = _first_env(api_key_env)
         chosen = (
             (gateway_api_key or provider_api_key)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/langchain_core-1.5.2/langchain_core/version.py 
new/langchain_core-1.5.3/langchain_core/version.py
--- old/langchain_core-1.5.2/langchain_core/version.py  2020-02-02 
01:00:00.000000000 +0100
+++ new/langchain_core-1.5.3/langchain_core/version.py  2020-02-02 
01:00:00.000000000 +0100
@@ -1,3 +1,3 @@
 """Version information for `langchain-core`."""
 
-VERSION = "1.5.2"
+VERSION = "1.5.3"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/langchain_core-1.5.2/pyproject.toml 
new/langchain_core-1.5.3/pyproject.toml
--- old/langchain_core-1.5.2/pyproject.toml     2020-02-02 01:00:00.000000000 
+0100
+++ new/langchain_core-1.5.3/pyproject.toml     2020-02-02 01:00:00.000000000 
+0100
@@ -21,7 +21,7 @@
     "Topic :: Software Development :: Libraries :: Python Modules",
 ]
 
-version = "1.5.2"
+version = "1.5.3"
 requires-python = ">=3.10.0,<4.0.0"
 dependencies = [
     "langsmith>=0.3.45,<1.0.0",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/langchain_core-1.5.2/tests/unit_tests/runnables/__snapshots__/test_fallbacks.ambr
 
new/langchain_core-1.5.3/tests/unit_tests/runnables/__snapshots__/test_fallbacks.ambr
--- 
old/langchain_core-1.5.2/tests/unit_tests/runnables/__snapshots__/test_fallbacks.ambr
       2020-02-02 01:00:00.000000000 +0100
+++ 
new/langchain_core-1.5.3/tests/unit_tests/runnables/__snapshots__/test_fallbacks.ambr
       2020-02-02 01:00:00.000000000 +0100
@@ -84,7 +84,7 @@
                   "fake",
                   "FakeListLLM"
                 ],
-                "repr": "FakeListLLM(metadata={'lc_versions': 
{'langchain-core': '1.5.2'}}, responses=['foo'], i=1)",
+                "repr": "FakeListLLM(metadata={'lc_versions': 
{'langchain-core': '1.5.3'}}, responses=['foo'], i=1)",
                 "name": "FakeListLLM"
               }
             },
@@ -128,7 +128,7 @@
                     "fake",
                     "FakeListLLM"
                   ],
-                  "repr": "FakeListLLM(metadata={'lc_versions': 
{'langchain-core': '1.5.2'}}, responses=['bar'])",
+                  "repr": "FakeListLLM(metadata={'lc_versions': 
{'langchain-core': '1.5.3'}}, responses=['bar'])",
                   "name": "FakeListLLM"
                 }
               },
@@ -268,7 +268,7 @@
           "fake",
           "FakeListLLM"
         ],
-        "repr": "FakeListLLM(metadata={'lc_versions': {'langchain-core': 
'1.5.2'}}, responses=['foo'], i=1)",
+        "repr": "FakeListLLM(metadata={'lc_versions': {'langchain-core': 
'1.5.3'}}, responses=['foo'], i=1)",
         "name": "FakeListLLM"
       },
       "fallbacks": [
@@ -281,7 +281,7 @@
             "fake",
             "FakeListLLM"
           ],
-          "repr": "FakeListLLM(metadata={'lc_versions': {'langchain-core': 
'1.5.2'}}, responses=['bar'])",
+          "repr": "FakeListLLM(metadata={'lc_versions': {'langchain-core': 
'1.5.3'}}, responses=['bar'])",
           "name": "FakeListLLM"
         }
       ],
@@ -322,7 +322,7 @@
           "fake",
           "FakeListLLM"
         ],
-        "repr": "FakeListLLM(metadata={'lc_versions': {'langchain-core': 
'1.5.2'}}, responses=['foo'], i=1)",
+        "repr": "FakeListLLM(metadata={'lc_versions': {'langchain-core': 
'1.5.3'}}, responses=['foo'], i=1)",
         "name": "FakeListLLM"
       },
       "fallbacks": [
@@ -335,7 +335,7 @@
             "fake",
             "FakeListLLM"
           ],
-          "repr": "FakeListLLM(metadata={'lc_versions': {'langchain-core': 
'1.5.2'}}, responses=['baz'], i=1)",
+          "repr": "FakeListLLM(metadata={'lc_versions': {'langchain-core': 
'1.5.3'}}, responses=['baz'], i=1)",
           "name": "FakeListLLM"
         },
         {
@@ -347,7 +347,7 @@
             "fake",
             "FakeListLLM"
           ],
-          "repr": "FakeListLLM(metadata={'lc_versions': {'langchain-core': 
'1.5.2'}}, responses=['bar'])",
+          "repr": "FakeListLLM(metadata={'lc_versions': {'langchain-core': 
'1.5.3'}}, responses=['bar'])",
           "name": "FakeListLLM"
         }
       ],
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/langchain_core-1.5.2/tests/unit_tests/runnables/__snapshots__/test_runnable.ambr
 
new/langchain_core-1.5.3/tests/unit_tests/runnables/__snapshots__/test_runnable.ambr
--- 
old/langchain_core-1.5.2/tests/unit_tests/runnables/__snapshots__/test_runnable.ambr
        2020-02-02 01:00:00.000000000 +0100
+++ 
new/langchain_core-1.5.3/tests/unit_tests/runnables/__snapshots__/test_runnable.ambr
        2020-02-02 01:00:00.000000000 +0100
@@ -97,7 +97,7 @@
             "fake_chat_models",
             "FakeListChatModel"
           ],
-          "repr": "FakeListChatModel(metadata={'lc_versions': 
{'langchain-core': '1.5.2'}}, responses=['foo, bar'])",
+          "repr": "FakeListChatModel(metadata={'lc_versions': 
{'langchain-core': '1.5.3'}}, responses=['foo, bar'])",
           "name": "FakeListChatModel"
         }
       ],
@@ -227,7 +227,7 @@
             "fake_chat_models",
             "FakeListChatModel"
           ],
-          "repr": "FakeListChatModel(metadata={'lc_versions': 
{'langchain-core': '1.5.2'}}, responses=['baz, qux'])",
+          "repr": "FakeListChatModel(metadata={'lc_versions': 
{'langchain-core': '1.5.3'}}, responses=['baz, qux'])",
           "name": "FakeListChatModel"
         }
       ],
@@ -346,7 +346,7 @@
             "fake_chat_models",
             "FakeListChatModel"
           ],
-          "repr": "FakeListChatModel(metadata={'lc_versions': 
{'langchain-core': '1.5.2'}}, responses=['foo, bar'])",
+          "repr": "FakeListChatModel(metadata={'lc_versions': 
{'langchain-core': '1.5.3'}}, responses=['foo, bar'])",
           "name": "FakeListChatModel"
         },
         {
@@ -457,7 +457,7 @@
             "fake_chat_models",
             "FakeListChatModel"
           ],
-          "repr": "FakeListChatModel(metadata={'lc_versions': 
{'langchain-core': '1.5.2'}}, responses=['baz, qux'])",
+          "repr": "FakeListChatModel(metadata={'lc_versions': 
{'langchain-core': '1.5.3'}}, responses=['baz, qux'])",
           "name": "FakeListChatModel"
         }
       ],
@@ -848,7 +848,7 @@
             "fake",
             "FakeStreamingListLLM"
           ],
-          "repr": "FakeStreamingListLLM(metadata={'lc_versions': 
{'langchain-core': '1.5.2'}}, responses=['first item, second item, third 
item'])",
+          "repr": "FakeStreamingListLLM(metadata={'lc_versions': 
{'langchain-core': '1.5.3'}}, responses=['first item, second item, third 
item'])",
           "name": "FakeStreamingListLLM"
         },
         {
@@ -884,7 +884,7 @@
               "fake",
               "FakeStreamingListLLM"
             ],
-            "repr": "FakeStreamingListLLM(metadata={'lc_versions': 
{'langchain-core': '1.5.2'}}, responses=['this', 'is', 'a', 'test'])",
+            "repr": "FakeStreamingListLLM(metadata={'lc_versions': 
{'langchain-core': '1.5.3'}}, responses=['this', 'is', 'a', 'test'])",
             "name": "FakeStreamingListLLM"
           }
         },
@@ -1009,7 +1009,7 @@
 # name: test_prompt_with_chat_model
   '''
   ChatPromptTemplate(input_variables=['question'], input_types={}, 
partial_variables={}, 
messages=[SystemMessagePromptTemplate(prompt=PromptTemplate(input_variables=[], 
input_types={}, partial_variables={}, template='You are a nice assistant.'), 
additional_kwargs={}), 
HumanMessagePromptTemplate(prompt=PromptTemplate(input_variables=['question'], 
input_types={}, partial_variables={}, template='{question}'), 
additional_kwargs={})])
-  | FakeListChatModel(metadata={'lc_versions': {'langchain-core': '1.5.2'}}, 
responses=['foo'])
+  | FakeListChatModel(metadata={'lc_versions': {'langchain-core': '1.5.3'}}, 
responses=['foo'])
   '''
 # ---
 # name: test_prompt_with_chat_model.1
@@ -1109,7 +1109,7 @@
           "fake_chat_models",
           "FakeListChatModel"
         ],
-        "repr": "FakeListChatModel(metadata={'lc_versions': {'langchain-core': 
'1.5.2'}}, responses=['foo'])",
+        "repr": "FakeListChatModel(metadata={'lc_versions': {'langchain-core': 
'1.5.3'}}, responses=['foo'])",
         "name": "FakeListChatModel"
       }
     },
@@ -1220,7 +1220,7 @@
             "fake_chat_models",
             "FakeListChatModel"
           ],
-          "repr": "FakeListChatModel(metadata={'lc_versions': 
{'langchain-core': '1.5.2'}}, responses=['foo, bar'])",
+          "repr": "FakeListChatModel(metadata={'lc_versions': 
{'langchain-core': '1.5.3'}}, responses=['foo, bar'])",
           "name": "FakeListChatModel"
         }
       ],
@@ -1249,7 +1249,7 @@
 # name: test_prompt_with_chat_model_async
   '''
   ChatPromptTemplate(input_variables=['question'], input_types={}, 
partial_variables={}, 
messages=[SystemMessagePromptTemplate(prompt=PromptTemplate(input_variables=[], 
input_types={}, partial_variables={}, template='You are a nice assistant.'), 
additional_kwargs={}), 
HumanMessagePromptTemplate(prompt=PromptTemplate(input_variables=['question'], 
input_types={}, partial_variables={}, template='{question}'), 
additional_kwargs={})])
-  | FakeListChatModel(metadata={'lc_versions': {'langchain-core': '1.5.2'}}, 
responses=['foo'])
+  | FakeListChatModel(metadata={'lc_versions': {'langchain-core': '1.5.3'}}, 
responses=['foo'])
   '''
 # ---
 # name: test_prompt_with_chat_model_async.1
@@ -1349,7 +1349,7 @@
           "fake_chat_models",
           "FakeListChatModel"
         ],
-        "repr": "FakeListChatModel(metadata={'lc_versions': {'langchain-core': 
'1.5.2'}}, responses=['foo'])",
+        "repr": "FakeListChatModel(metadata={'lc_versions': {'langchain-core': 
'1.5.3'}}, responses=['foo'])",
         "name": "FakeListChatModel"
       }
     },
@@ -1459,7 +1459,7 @@
           "fake",
           "FakeListLLM"
         ],
-        "repr": "FakeListLLM(metadata={'lc_versions': {'langchain-core': 
'1.5.2'}}, responses=['foo', 'bar'])",
+        "repr": "FakeListLLM(metadata={'lc_versions': {'langchain-core': 
'1.5.3'}}, responses=['foo', 'bar'])",
         "name": "FakeListLLM"
       }
     },
@@ -1576,7 +1576,7 @@
             "fake",
             "FakeListLLM"
           ],
-          "repr": "FakeListLLM(metadata={'lc_versions': {'langchain-core': 
'1.5.2'}}, responses=['foo', 'bar'])",
+          "repr": "FakeListLLM(metadata={'lc_versions': {'langchain-core': 
'1.5.3'}}, responses=['foo', 'bar'])",
           "name": "FakeListLLM"
         }
       ],
@@ -1699,7 +1699,7 @@
             "fake",
             "FakeStreamingListLLM"
           ],
-          "repr": "FakeStreamingListLLM(metadata={'lc_versions': 
{'langchain-core': '1.5.2'}}, responses=['bear, dog, cat', 'tomato, lettuce, 
onion'])",
+          "repr": "FakeStreamingListLLM(metadata={'lc_versions': 
{'langchain-core': '1.5.3'}}, responses=['bear, dog, cat', 'tomato, lettuce, 
onion'])",
           "name": "FakeStreamingListLLM"
         }
       ],
@@ -1867,7 +1867,7 @@
                     "fake",
                     "FakeListLLM"
                   ],
-                  "repr": "FakeListLLM(metadata={'lc_versions': 
{'langchain-core': '1.5.2'}}, responses=['4'])",
+                  "repr": "FakeListLLM(metadata={'lc_versions': 
{'langchain-core': '1.5.3'}}, responses=['4'])",
                   "name": "FakeListLLM"
                 }
               },
@@ -1940,7 +1940,7 @@
                     "fake",
                     "FakeListLLM"
                   ],
-                  "repr": "FakeListLLM(metadata={'lc_versions': 
{'langchain-core': '1.5.2'}}, responses=['2'])",
+                  "repr": "FakeListLLM(metadata={'lc_versions': 
{'langchain-core': '1.5.3'}}, responses=['2'])",
                   "name": "FakeListLLM"
                 }
               },
@@ -13407,7 +13407,7 @@
     just_to_test_lambda: RunnableLambda(...)
   }
   | ChatPromptTemplate(input_variables=['documents', 'question'], 
input_types={}, partial_variables={}, 
messages=[SystemMessagePromptTemplate(prompt=PromptTemplate(input_variables=[], 
input_types={}, partial_variables={}, template='You are a nice assistant.'), 
additional_kwargs={}), 
HumanMessagePromptTemplate(prompt=PromptTemplate(input_variables=['documents', 
'question'], input_types={}, partial_variables={}, 
template='Context:\n{documents}\n\nQuestion:\n{question}'), 
additional_kwargs={})])
-  | FakeListChatModel(metadata={'lc_versions': {'langchain-core': '1.5.2'}}, 
responses=['foo, bar'])
+  | FakeListChatModel(metadata={'lc_versions': {'langchain-core': '1.5.3'}}, 
responses=['foo, bar'])
   | CommaSeparatedListOutputParser()
   '''
 # ---
@@ -13610,7 +13610,7 @@
             "fake_chat_models",
             "FakeListChatModel"
           ],
-          "repr": "FakeListChatModel(metadata={'lc_versions': 
{'langchain-core': '1.5.2'}}, responses=['foo, bar'])",
+          "repr": "FakeListChatModel(metadata={'lc_versions': 
{'langchain-core': '1.5.3'}}, responses=['foo, bar'])",
           "name": "FakeListChatModel"
         }
       ],
@@ -13636,8 +13636,8 @@
   ChatPromptTemplate(input_variables=['question'], input_types={}, 
partial_variables={}, 
messages=[SystemMessagePromptTemplate(prompt=PromptTemplate(input_variables=[], 
input_types={}, partial_variables={}, template='You are a nice assistant.'), 
additional_kwargs={}), 
HumanMessagePromptTemplate(prompt=PromptTemplate(input_variables=['question'], 
input_types={}, partial_variables={}, template='{question}'), 
additional_kwargs={})])
   | RunnableLambda(...)
   | {
-      chat: FakeListChatModel(metadata={'lc_versions': {'langchain-core': 
'1.5.2'}}, responses=["i'm a chatbot"]),
-      llm: FakeListLLM(metadata={'lc_versions': {'langchain-core': '1.5.2'}}, 
responses=["i'm a textbot"])
+      chat: FakeListChatModel(metadata={'lc_versions': {'langchain-core': 
'1.5.3'}}, responses=["i'm a chatbot"]),
+      llm: FakeListLLM(metadata={'lc_versions': {'langchain-core': '1.5.3'}}, 
responses=["i'm a textbot"])
     }
   '''
 # ---
@@ -13762,7 +13762,7 @@
                 "fake_chat_models",
                 "FakeListChatModel"
               ],
-              "repr": "FakeListChatModel(metadata={'lc_versions': 
{'langchain-core': '1.5.2'}}, responses=[\"i'm a chatbot\"])",
+              "repr": "FakeListChatModel(metadata={'lc_versions': 
{'langchain-core': '1.5.3'}}, responses=[\"i'm a chatbot\"])",
               "name": "FakeListChatModel"
             },
             "llm": {
@@ -13774,7 +13774,7 @@
                 "fake",
                 "FakeListLLM"
               ],
-              "repr": "FakeListLLM(metadata={'lc_versions': {'langchain-core': 
'1.5.2'}}, responses=[\"i'm a textbot\"])",
+              "repr": "FakeListLLM(metadata={'lc_versions': {'langchain-core': 
'1.5.3'}}, responses=[\"i'm a textbot\"])",
               "name": "FakeListLLM"
             }
           }
@@ -13917,7 +13917,7 @@
                     "fake_chat_models",
                     "FakeListChatModel"
                   ],
-                  "repr": "FakeListChatModel(metadata={'lc_versions': 
{'langchain-core': '1.5.2'}}, responses=[\"i'm a chatbot\"])",
+                  "repr": "FakeListChatModel(metadata={'lc_versions': 
{'langchain-core': '1.5.3'}}, responses=[\"i'm a chatbot\"])",
                   "name": "FakeListChatModel"
                 },
                 "kwargs": {
@@ -13938,7 +13938,7 @@
                 "fake",
                 "FakeListLLM"
               ],
-              "repr": "FakeListLLM(metadata={'lc_versions': {'langchain-core': 
'1.5.2'}}, responses=[\"i'm a textbot\"])",
+              "repr": "FakeListLLM(metadata={'lc_versions': {'langchain-core': 
'1.5.3'}}, responses=[\"i'm a textbot\"])",
               "name": "FakeListLLM"
             },
             "passthrough": {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/langchain_core-1.5.2/tests/unit_tests/utils/test_gateway.py 
new/langchain_core-1.5.3/tests/unit_tests/utils/test_gateway.py
--- old/langchain_core-1.5.2/tests/unit_tests/utils/test_gateway.py     
2020-02-02 01:00:00.000000000 +0100
+++ new/langchain_core-1.5.3/tests/unit_tests/utils/test_gateway.py     
2020-02-02 01:00:00.000000000 +0100
@@ -25,6 +25,7 @@
     for var in (
         "LANGSMITH_GATEWAY",
         "LANGSMITH_GATEWAY_API_KEY",
+        "LANGSMITH_API_KEY",
         _BASE_ENV,
         _KEY_ENV,
     ):
@@ -91,6 +92,26 @@
     assert config.api_key.get_secret_value() == "gateway-key"
 
 
+def test_gateway_on_falls_back_to_langsmith_key(
+    monkeypatch: pytest.MonkeyPatch,
+) -> None:
+    monkeypatch.setenv("LANGSMITH_GATEWAY", "true")
+    monkeypatch.setenv("LANGSMITH_API_KEY", "langsmith-key")
+    config = _config()
+    assert config.base_url == _DEFAULT_GATEWAY
+    assert isinstance(config.api_key, SecretStr)
+    assert config.api_key.get_secret_value() == "langsmith-key"
+
+
+def test_gateway_key_beats_langsmith_key(monkeypatch: pytest.MonkeyPatch) -> 
None:
+    monkeypatch.setenv("LANGSMITH_GATEWAY", "true")
+    monkeypatch.setenv("LANGSMITH_GATEWAY_API_KEY", "gateway-key")
+    monkeypatch.setenv("LANGSMITH_API_KEY", "langsmith-key")
+    config = _config()
+    assert isinstance(config.api_key, SecretStr)
+    assert config.api_key.get_secret_value() == "gateway-key"
+
+
 def test_gateway_key_ignored_when_gateway_off(
     monkeypatch: pytest.MonkeyPatch,
 ) -> None:
@@ -147,6 +168,17 @@
     assert config.api_key.get_secret_value() == "provider-key"
 
 
+def test_provider_base_url_does_not_use_langsmith_key(
+    monkeypatch: pytest.MonkeyPatch,
+) -> None:
+    monkeypatch.setenv("LANGSMITH_GATEWAY", "true")
+    monkeypatch.setenv("LANGSMITH_API_KEY", "langsmith-key")
+    monkeypatch.setenv(_BASE_ENV, "https://api.openai.com/v1";)
+    config = _config()
+    assert config.base_url == "https://api.openai.com/v1";
+    assert config.api_key is None
+
+
 def test_provider_base_url_falls_back_to_gateway_key(
     monkeypatch: pytest.MonkeyPatch,
 ) -> None:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/langchain_core-1.5.2/uv.lock 
new/langchain_core-1.5.3/uv.lock
--- old/langchain_core-1.5.2/uv.lock    2020-02-02 01:00:00.000000000 +0100
+++ new/langchain_core-1.5.3/uv.lock    2020-02-02 01:00:00.000000000 +0100
@@ -1040,7 +1040,7 @@
 
 [[package]]
 name = "langchain-core"
-version = "1.5.2"
+version = "1.5.3"
 source = { editable = "." }
 dependencies = [
     { name = "jsonpatch" },

Reply via email to