Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-langchain-anthropic for 
openSUSE:Factory checked in at 2026-09-08 16:53:24
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-langchain-anthropic (Old)
 and      /work/SRC/openSUSE:Factory/.python-langchain-anthropic.new.1265 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-langchain-anthropic"

Tue Sep  8 16:53:24 2026 rev:12 rq:1375744 version:1.7.1

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/python-langchain-anthropic/python-langchain-anthropic.changes
    2026-08-28 19:48:02.327353189 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-langchain-anthropic.new.1265/python-langchain-anthropic.changes
  2026-09-08 16:54:02.187761847 +0200
@@ -1,0 +2,14 @@
+Fri Sep  4 07:55:23 UTC 2026 - Martin Pluskal <[email protected]>
+
+- Update to 1.7.1:
+  * Add Claude Fable 5.1 support: new claude-fable-5-1 model
+    profile; the model only does adaptive thinking, so a
+    disabled and a manually budgeted thinking block both raise
+    now, as do top_k and non-default top_p/temperature - which
+    are additionally stripped from the request payload
+  * AnthropicPromptCachingMiddleware now omits its inputs from
+    trace payloads when the installed langchain provides
+    TracePolicy
+- Follow upstream and raise the langchain-core floor to 1.6.1
+
+-------------------------------------------------------------------

Old:
----
  langchain_anthropic-1.7.0.tar.gz

New:
----
  langchain_anthropic-1.7.1.tar.gz

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

Other differences:
------------------
++++++ python-langchain-anthropic.spec ++++++
--- /var/tmp/diff_new_pack.m896iH/_old  2026-09-08 16:54:02.976794950 +0200
+++ /var/tmp/diff_new_pack.m896iH/_new  2026-09-08 16:54:02.978795034 +0200
@@ -18,7 +18,7 @@
 
 %{?sle15_python_module_pythons}
 Name:           python-langchain-anthropic
-Version:        1.7.0
+Version:        1.7.1
 Release:        0
 Summary:        Integration package connecting Claude (Anthropic) APIs and 
LangChain
 License:        MIT
@@ -29,7 +29,7 @@
 BuildRequires:  fdupes
 BuildRequires:  python-rpm-macros
 Requires:       python-anthropic >= 0.120.0
-Requires:       python-langchain-core >= 1.6.0
+Requires:       python-langchain-core >= 1.6.1
 Requires:       python-pydantic >= 2.7.4
 BuildArch:      noarch
 # SECTION test requirements
@@ -37,7 +37,7 @@
 BuildRequires:  %{python_module blockbuster}
 BuildRequires:  %{python_module defusedxml}
 BuildRequires:  %{python_module freezegun}
-BuildRequires:  %{python_module langchain-core >= 1.6.0}
+BuildRequires:  %{python_module langchain-core >= 1.6.1}
 BuildRequires:  %{python_module pydantic >= 2.7.4}
 BuildRequires:  %{python_module pytest-asyncio}
 BuildRequires:  %{python_module pytest-mock}

++++++ langchain_anthropic-1.7.0.tar.gz -> langchain_anthropic-1.7.1.tar.gz 
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/langchain_anthropic-1.7.0/PKG-INFO 
new/langchain_anthropic-1.7.1/PKG-INFO
--- old/langchain_anthropic-1.7.0/PKG-INFO      2020-02-02 01:00:00.000000000 
+0100
+++ new/langchain_anthropic-1.7.1/PKG-INFO      2020-02-02 01:00:00.000000000 
+0100
@@ -1,6 +1,6 @@
 Metadata-Version: 2.5
 Name: langchain-anthropic
-Version: 1.7.0
+Version: 1.7.1
 Summary: Integration package connecting Claude (Anthropic) APIs and LangChain
 Project-URL: Homepage, 
https://docs.langchain.com/oss/python/integrations/providers/anthropic
 Project-URL: Documentation, 
https://reference.langchain.com/python/integrations/langchain_anthropic/
@@ -24,7 +24,7 @@
 Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
 Requires-Python: <4.0.0,>=3.10.0
 Requires-Dist: anthropic<2.0.0,>=0.120.0
-Requires-Dist: langchain-core<2.0.0,>=1.6.0
+Requires-Dist: langchain-core<2.0.0,>=1.6.1
 Requires-Dist: pydantic<3.0.0,>=2.7.4
 Description-Content-Type: text/markdown
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/langchain_anthropic-1.7.0/langchain_anthropic/_version.py 
new/langchain_anthropic-1.7.1/langchain_anthropic/_version.py
--- old/langchain_anthropic-1.7.0/langchain_anthropic/_version.py       
2020-02-02 01:00:00.000000000 +0100
+++ new/langchain_anthropic-1.7.1/langchain_anthropic/_version.py       
2020-02-02 01:00:00.000000000 +0100
@@ -1,3 +1,3 @@
 """Version information for `langchain-anthropic`."""
 
-__version__ = "1.7.0"
+__version__ = "1.7.1"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/langchain_anthropic-1.7.0/langchain_anthropic/chat_models.py 
new/langchain_anthropic-1.7.1/langchain_anthropic/chat_models.py
--- old/langchain_anthropic-1.7.0/langchain_anthropic/chat_models.py    
2020-02-02 01:00:00.000000000 +0100
+++ new/langchain_anthropic-1.7.1/langchain_anthropic/chat_models.py    
2020-02-02 01:00:00.000000000 +0100
@@ -1511,8 +1511,34 @@
         if effort:
             output_config["effort"] = effort
 
+        is_fable_model = self.model.startswith("claude-fable-5")
+        if is_fable_model:
+            top_k = request_config.get("top_k", self.top_k)
+            top_p = request_config.get("top_p", self.top_p)
+            temperature = request_config.get("temperature", self.temperature)
+            if top_k is not None:
+                msg = f"`top_k` is not supported for {self.model}."
+                raise ValueError(msg)
+            if top_p is not None and top_p != 1:
+                msg = (
+                    f"`top_p` is not supported for {self.model} at non-default 
values."
+                )
+                raise ValueError(msg)
+            if temperature is not None and temperature != 1:
+                msg = (
+                    f"`temperature` is not supported for {self.model} at "
+                    "non-default values."
+                )
+                raise ValueError(msg)
+            if isinstance(thinking, Mapping) and thinking.get("type") == 
"disabled":
+                msg = (
+                    '`thinking={"type": "disabled"}` is not supported for '
+                    f"{self.model}; omit `thinking` to use adaptive thinking."
+                )
+                raise ValueError(msg)
+
         if (
-            self.model.startswith("claude-opus-5")
+            (self.model.startswith("claude-opus-5") or is_fable_model)
             and isinstance(thinking, Mapping)
             and thinking.get("type") == "enabled"
         ):
@@ -1625,6 +1651,10 @@
             payload["thinking"] = self.thinking
         if self.inference_geo is not None:
             payload["inference_geo"] = self.inference_geo
+        if self.model.startswith("claude-fable-5"):
+            payload.pop("temperature", None)
+            payload.pop("top_k", None)
+            payload.pop("top_p", None)
 
         # Handle output_config and effort parameter
         # Priority: kwarg `effort`/`reasoning_effort` > kwarg `output_config`
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/langchain_anthropic-1.7.0/langchain_anthropic/data/_profiles.py 
new/langchain_anthropic-1.7.1/langchain_anthropic/data/_profiles.py
--- old/langchain_anthropic-1.7.0/langchain_anthropic/data/_profiles.py 
2020-02-02 01:00:00.000000000 +0100
+++ new/langchain_anthropic-1.7.1/langchain_anthropic/data/_profiles.py 
2020-02-02 01:00:00.000000000 +0100
@@ -50,6 +50,40 @@
         ],
         "reasoning_effort_default": "high",
     },
+    "claude-fable-5-1": {
+        "name": "Claude Fable 5.1",
+        "release_date": "2026-09-01",
+        "last_updated": "2026-09-01",
+        "open_weights": False,
+        "max_input_tokens": 1000000,
+        "max_output_tokens": 128000,
+        "text_inputs": True,
+        "image_inputs": True,
+        "audio_inputs": False,
+        "pdf_inputs": True,
+        "video_inputs": False,
+        "text_outputs": True,
+        "image_outputs": False,
+        "audio_outputs": False,
+        "video_outputs": False,
+        "reasoning_output": True,
+        "tool_calling": True,
+        "structured_output": True,
+        "attachment": True,
+        "temperature": False,
+        "image_url_inputs": True,
+        "pdf_tool_message": True,
+        "image_tool_message": True,
+        "tool_call_streaming": True,
+        "reasoning_effort_levels": [
+            "low",
+            "medium",
+            "high",
+            "xhigh",
+            "max",
+        ],
+        "reasoning_effort_default": "high",
+    },
     "claude-haiku-4-5": {
         "name": "Claude Haiku 4.5 (latest)",
         "release_date": "2025-10-15",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/langchain_anthropic-1.7.0/langchain_anthropic/data/profile_augmentations.toml
 
new/langchain_anthropic-1.7.1/langchain_anthropic/data/profile_augmentations.toml
--- 
old/langchain_anthropic-1.7.0/langchain_anthropic/data/profile_augmentations.toml
   2020-02-02 01:00:00.000000000 +0100
+++ 
new/langchain_anthropic-1.7.1/langchain_anthropic/data/profile_augmentations.toml
   2020-02-02 01:00:00.000000000 +0100
@@ -57,3 +57,8 @@
 structured_output = true
 reasoning_effort_levels = ["low", "medium", "high", "xhigh", "max"]
 reasoning_effort_default = "high"
+
+[overrides."claude-fable-5-1"]
+structured_output = true
+reasoning_effort_levels = ["low", "medium", "high", "xhigh", "max"]
+reasoning_effort_default = "high"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/langchain_anthropic-1.7.0/langchain_anthropic/middleware/prompt_caching.py 
new/langchain_anthropic-1.7.1/langchain_anthropic/middleware/prompt_caching.py
--- 
old/langchain_anthropic-1.7.0/langchain_anthropic/middleware/prompt_caching.py  
    2020-02-02 01:00:00.000000000 +0100
+++ 
new/langchain_anthropic-1.7.1/langchain_anthropic/middleware/prompt_caching.py  
    2020-02-02 01:00:00.000000000 +0100
@@ -32,6 +32,18 @@
     raise ImportError(msg) from e
 
 
+def _get_trace_policy() -> Any:
+    """Use tracing optimizations when supported by the installed LangChain."""
+    try:
+        from langchain.agents.middleware.types import TracePolicy, omit_payload
+    except ImportError:
+        return None
+    return TracePolicy(process_inputs=omit_payload)
+
+
+_TRACE_POLICY = _get_trace_policy()
+
+
 class AnthropicPromptCachingMiddleware(AgentMiddleware):
     """Prompt Caching Middleware.
 
@@ -55,6 +67,8 @@
     
[here](https://platform.claude.com/docs/en/build-with-claude/prompt-caching).
     """
 
+    trace_policy = _TRACE_POLICY
+
     def __init__(
         self,
         type: Literal["ephemeral"] = "ephemeral",  # noqa: A002
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/langchain_anthropic-1.7.0/pyproject.toml 
new/langchain_anthropic-1.7.1/pyproject.toml
--- old/langchain_anthropic-1.7.0/pyproject.toml        2020-02-02 
01:00:00.000000000 +0100
+++ new/langchain_anthropic-1.7.1/pyproject.toml        2020-02-02 
01:00:00.000000000 +0100
@@ -20,11 +20,11 @@
     "Topic :: Scientific/Engineering :: Artificial Intelligence",
 ]
 
-version = "1.7.0"
+version = "1.7.1"
 requires-python = ">=3.10.0,<4.0.0"
 dependencies = [
     "anthropic>=0.120.0,<2.0.0",
-    "langchain-core>=1.6.0,<2.0.0",
+    "langchain-core>=1.6.1,<2.0.0",
     "pydantic>=2.7.4,<3.0.0",
 ]
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/langchain_anthropic-1.7.0/tests/unit_tests/middleware/test_prompt_caching.py
 
new/langchain_anthropic-1.7.1/tests/unit_tests/middleware/test_prompt_caching.py
--- 
old/langchain_anthropic-1.7.0/tests/unit_tests/middleware/test_prompt_caching.py
    2020-02-02 01:00:00.000000000 +0100
+++ 
new/langchain_anthropic-1.7.1/tests/unit_tests/middleware/test_prompt_caching.py
    2020-02-02 01:00:00.000000000 +0100
@@ -1,8 +1,9 @@
 """Tests for Anthropic prompt caching middleware."""
 
 import warnings
+from types import ModuleType
 from typing import Any, cast
-from unittest.mock import MagicMock
+from unittest.mock import MagicMock, patch
 
 import pytest
 from langchain.agents.middleware.types import ModelRequest, ModelResponse
@@ -17,7 +18,10 @@
 from langgraph.runtime import Runtime
 
 from langchain_anthropic.chat_models import ChatAnthropic
-from langchain_anthropic.middleware import AnthropicPromptCachingMiddleware
+from langchain_anthropic.middleware import (
+    AnthropicPromptCachingMiddleware,
+    prompt_caching,
+)
 
 
 class FakeToolCallingModel(BaseChatModel):
@@ -52,6 +56,18 @@
         return "fake-tool-call-model"
 
 
+def test_trace_inputs_are_omitted() -> None:
+    policy = AnthropicPromptCachingMiddleware.trace_policy
+    assert policy.process_inputs is not None
+    assert policy.process_inputs({"messages": [HumanMessage("foo")]}) == {}
+
+
+def test_trace_policy_unsupported_langchain() -> None:
+    old_types = ModuleType("langchain.agents.middleware.types")
+    with patch.dict("sys.modules", {"langchain.agents.middleware.types": 
old_types}):
+        assert prompt_caching._get_trace_policy() is None
+
+
 def test_anthropic_prompt_caching_middleware_initialization() -> None:
     """Test AnthropicPromptCachingMiddleware initialization."""
     # Test with custom values
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/langchain_anthropic-1.7.0/tests/unit_tests/test_chat_models.py 
new/langchain_anthropic-1.7.1/tests/unit_tests/test_chat_models.py
--- old/langchain_anthropic-1.7.0/tests/unit_tests/test_chat_models.py  
2020-02-02 01:00:00.000000000 +0100
+++ new/langchain_anthropic-1.7.1/tests/unit_tests/test_chat_models.py  
2020-02-02 01:00:00.000000000 +0100
@@ -3911,6 +3911,36 @@
     assert payload["output_config"]["effort"] == "high"
 
 
[email protected](
+    ("kwargs", "match"),
+    [
+        ({"thinking": {"type": "disabled"}}, r"not supported for 
claude-fable-5-1"),
+        ({"top_k": 1}, r"`top_k` is not supported"),
+        ({"top_p": 0.9}, r"`top_p` is not supported"),
+        ({"temperature": 0.1}, r"`temperature` is not supported"),
+    ],
+)
+def test_fable_5_1_rejects_unsupported_parameters(
+    kwargs: dict[str, object], match: str
+) -> None:
+    """Fable 5.1 only supports adaptive thinking and default sampling."""
+    model = ChatAnthropic(model="claude-fable-5-1", **kwargs)
+
+    with pytest.raises(ValueError, match=match):
+        model._get_request_payload("Test query")
+
+
+def test_fable_5_1_rejects_manual_thinking() -> None:
+    """Fable 5.1 does not support manual thinking budgets."""
+    model = ChatAnthropic(
+        model="claude-fable-5-1",
+        thinking={"type": "enabled", "budget_tokens": 1_024},
+    )
+
+    with pytest.raises(ValueError, match=r"use adaptive thinking"):
+        model._get_request_payload("Test query")
+
+
 def test_reasoning_effort_defaults_adaptive_thinking() -> None:
     """Test that `reasoning_effort` also defaults `thinking` to adaptive.
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/langchain_anthropic-1.7.0/uv.lock 
new/langchain_anthropic-1.7.1/uv.lock
--- old/langchain_anthropic-1.7.0/uv.lock       2020-02-02 01:00:00.000000000 
+0100
+++ new/langchain_anthropic-1.7.1/uv.lock       2020-02-02 01:00:00.000000000 
+0100
@@ -583,7 +583,7 @@
 
 [[package]]
 name = "langchain"
-version = "1.3.17"
+version = "1.3.18"
 source = { editable = "../../langchain_v1" }
 dependencies = [
     { name = "langchain-core" },
@@ -638,7 +638,7 @@
     { name = "langchain-text-splitters", editable = "../../text-splitters" },
     { name = "langchainhub", specifier = ">=0.1.16,<1.0.0" },
     { name = "python-dotenv", specifier = ">=1.0.0,<2.0.0" },
-    { name = "vcrpy", specifier = ">=8.0.0,<9.0.0" },
+    { name = "vcrpy", specifier = ">=8.2.0,<9.0.0" },
     { name = "wrapt", specifier = ">=1.15.0,<3.0.0" },
 ]
 typing = [
@@ -648,7 +648,7 @@
 
 [[package]]
 name = "langchain-anthropic"
-version = "1.7.0"
+version = "1.7.1"
 source = { editable = "." }
 dependencies = [
     { name = "anthropic" },
@@ -826,7 +826,7 @@
     { name = "pytest-codspeed" },
     { name = "pytest-recording" },
     { name = "pytest-socket", specifier = ">=0.7.0,<1.0.0" },
-    { name = "syrupy", specifier = ">=5.0.0,<6.0.0" },
+    { name = "syrupy", specifier = ">=5.0.0,<7.0.0" },
     { name = "vcrpy", specifier = ">=8.2.1,<9.0.0" },
 ]
 

Reply via email to