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-11 18:03:19
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
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"
Fri Sep 11 18:03:19 2026 rev:13 rq:1377316 version:1.7.2
Changes:
--------
---
/work/SRC/openSUSE:Factory/python-langchain-anthropic/python-langchain-anthropic.changes
2026-09-08 16:54:02.187761847 +0200
+++
/work/SRC/openSUSE:Factory/.python-langchain-anthropic.new.1265/python-langchain-anthropic.changes
2026-09-11 18:06:59.068024984 +0200
@@ -1,0 +2,11 @@
+Fri Sep 11 06:51:45 UTC 2026 - Martin Pluskal <[email protected]>
+
+- Update to 1.7.2:
+ * Preserve malformed streamed tool invocations when replaying
+ Anthropic messages: an invalid_tool_call keeps its id and name
+ as a tool_use block with empty input, so the matching error
+ ToolMessage is no longer an orphaned tool_result rejected by
+ the API
+- Follow upstream and raise the langchain-core floor to 1.6.2
+
+-------------------------------------------------------------------
Old:
----
langchain_anthropic-1.7.1.tar.gz
New:
----
langchain_anthropic-1.7.2.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-langchain-anthropic.spec ++++++
--- /var/tmp/diff_new_pack.7scUxj/_old 2026-09-11 18:06:59.797055602 +0200
+++ /var/tmp/diff_new_pack.7scUxj/_new 2026-09-11 18:06:59.800055728 +0200
@@ -18,7 +18,7 @@
%{?sle15_python_module_pythons}
Name: python-langchain-anthropic
-Version: 1.7.1
+Version: 1.7.2
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.1
+Requires: python-langchain-core >= 1.6.2
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.1}
+BuildRequires: %{python_module langchain-core >= 1.6.2}
BuildRequires: %{python_module pydantic >= 2.7.4}
BuildRequires: %{python_module pytest-asyncio}
BuildRequires: %{python_module pytest-mock}
++++++ langchain_anthropic-1.7.1.tar.gz -> langchain_anthropic-1.7.2.tar.gz
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/langchain_anthropic-1.7.1/PKG-INFO
new/langchain_anthropic-1.7.2/PKG-INFO
--- old/langchain_anthropic-1.7.1/PKG-INFO 2020-02-02 01:00:00.000000000
+0100
+++ new/langchain_anthropic-1.7.2/PKG-INFO 2020-02-02 01:00:00.000000000
+0100
@@ -1,6 +1,6 @@
Metadata-Version: 2.5
Name: langchain-anthropic
-Version: 1.7.1
+Version: 1.7.2
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.1
+Requires-Dist: langchain-core<2.0.0,>=1.6.2
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.1/langchain_anthropic/_compat.py
new/langchain_anthropic-1.7.2/langchain_anthropic/_compat.py
--- old/langchain_anthropic-1.7.1/langchain_anthropic/_compat.py
2020-02-02 01:00:00.000000000 +0100
+++ new/langchain_anthropic-1.7.2/langchain_anthropic/_compat.py
2020-02-02 01:00:00.000000000 +0100
@@ -141,7 +141,23 @@
)
elif block["type"] == "invalid_tool_call":
- continue
+ tool_call_id = block.get("id")
+ tool_name = block.get("name")
+ if (
+ model_provider == "anthropic"
+ and isinstance(tool_call_id, str)
+ and tool_call_id
+ and isinstance(tool_name, str)
+ and tool_name
+ ):
+ new_content.append(
+ {
+ "type": "tool_use",
+ "name": tool_name,
+ "input": {},
+ "id": tool_call_id,
+ }
+ )
elif block["type"] == "reasoning" and model_provider == "anthropic":
new_block = {}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/langchain_anthropic-1.7.1/langchain_anthropic/_version.py
new/langchain_anthropic-1.7.2/langchain_anthropic/_version.py
--- old/langchain_anthropic-1.7.1/langchain_anthropic/_version.py
2020-02-02 01:00:00.000000000 +0100
+++ new/langchain_anthropic-1.7.2/langchain_anthropic/_version.py
2020-02-02 01:00:00.000000000 +0100
@@ -1,3 +1,3 @@
"""Version information for `langchain-anthropic`."""
-__version__ = "1.7.1"
+__version__ = "1.7.2"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/langchain_anthropic-1.7.1/pyproject.toml
new/langchain_anthropic-1.7.2/pyproject.toml
--- old/langchain_anthropic-1.7.1/pyproject.toml 2020-02-02
01:00:00.000000000 +0100
+++ new/langchain_anthropic-1.7.2/pyproject.toml 2020-02-02
01:00:00.000000000 +0100
@@ -20,11 +20,11 @@
"Topic :: Scientific/Engineering :: Artificial Intelligence",
]
-version = "1.7.1"
+version = "1.7.2"
requires-python = ">=3.10.0,<4.0.0"
dependencies = [
"anthropic>=0.120.0,<2.0.0",
- "langchain-core>=1.6.1,<2.0.0",
+ "langchain-core>=1.6.2,<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.1/tests/unit_tests/test_chat_models.py
new/langchain_anthropic-1.7.2/tests/unit_tests/test_chat_models.py
--- old/langchain_anthropic-1.7.1/tests/unit_tests/test_chat_models.py
2020-02-02 01:00:00.000000000 +0100
+++ new/langchain_anthropic-1.7.2/tests/unit_tests/test_chat_models.py
2020-02-02 01:00:00.000000000 +0100
@@ -3250,6 +3250,47 @@
assert block["signature"] == "sig_xyz"
+def test_v1_invalid_tool_call_retains_tool_use_for_error_result() -> None:
+ """An error result must retain its Anthropic tool-use block on replay."""
+ tool_call_id = "toolu_invalid"
+ invalid_tool_call = {
+ "type": "invalid_tool_call",
+ "id": tool_call_id,
+ "name": "get_weather",
+ "args": '{"location":',
+ "error": "Failed to parse tool call arguments as JSON",
+ }
+ ai_message = AIMessage(
+ content=[invalid_tool_call],
+ invalid_tool_calls=[invalid_tool_call],
+ response_metadata={"model_provider": "anthropic", "output_version":
"v1"},
+ )
+ tool_message = ToolMessage(
+ "Tool call arguments were malformed.",
+ tool_call_id=tool_call_id,
+ status="error",
+ )
+ llm = ChatAnthropic(model=MODEL_NAME) # type: ignore[call-arg]
+
+ payload = llm._get_request_payload(
+ [HumanMessage("Check the weather"), ai_message, tool_message]
+ )
+
+ assert payload["messages"][1] == {
+ "role": "assistant",
+ "content": [
+ {
+ "type": "tool_use",
+ "id": tool_call_id,
+ "name": "get_weather",
+ "input": {},
+ }
+ ],
+ }
+ assert payload["messages"][2]["content"][0]["tool_use_id"] == tool_call_id
+ assert payload["messages"][2]["content"][0]["is_error"] is True
+
+
def test_strict_tool_use() -> None:
model = ChatAnthropic(
model=MODEL_NAME, # type: ignore[call-arg]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/langchain_anthropic-1.7.1/tests/unit_tests/test_compat.py
new/langchain_anthropic-1.7.2/tests/unit_tests/test_compat.py
--- old/langchain_anthropic-1.7.1/tests/unit_tests/test_compat.py
2020-02-02 01:00:00.000000000 +0100
+++ new/langchain_anthropic-1.7.2/tests/unit_tests/test_compat.py
2020-02-02 01:00:00.000000000 +0100
@@ -5,8 +5,8 @@
from langchain_anthropic._compat import _convert_from_v1_to_anthropic
-def test_convert_from_v1_filters_invalid_tool_calls() -> None:
- """Test that invalid tool calls are not sent to Anthropic."""
+def test_convert_from_v1_restores_anthropic_invalid_tool_calls() -> None:
+ """Test that Anthropic invalid tool calls retain their tool-use
identity."""
content: list[types.ContentBlock] = [
{"type": "text", "text": "Let me check."},
{
@@ -30,8 +30,44 @@
{"type": "text", "text": "Let me check."},
{
"type": "tool_use",
+ "id": "toolu_invalid",
+ "name": "get_weather",
+ "input": {},
+ },
+ {
+ "type": "tool_use",
"id": "toolu_valid",
"name": "get_weather",
"input": {"city": "San Francisco"},
},
]
+
+
+def test_convert_from_v1_filters_non_anthropic_invalid_tool_calls() -> None:
+ """Test that invalid calls from other providers are not promoted."""
+ content: list[types.ContentBlock] = [
+ {
+ "type": "invalid_tool_call",
+ "id": "call_invalid",
+ "name": "get_weather",
+ "args": '{"city":',
+ "error": "Invalid JSON",
+ }
+ ]
+
+ assert _convert_from_v1_to_anthropic(content, [], "openai") == []
+
+
+def test_convert_from_v1_filters_unidentified_invalid_tool_calls() -> None:
+ """Test that incomplete blocks are not promoted into tool calls."""
+ content: list[types.ContentBlock] = [
+ {
+ "type": "invalid_tool_call",
+ "id": None,
+ "name": "get_weather",
+ "args": '{"city":',
+ "error": "Invalid JSON",
+ }
+ ]
+
+ assert _convert_from_v1_to_anthropic(content, [], "anthropic") == []
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/langchain_anthropic-1.7.1/uv.lock
new/langchain_anthropic-1.7.2/uv.lock
--- old/langchain_anthropic-1.7.1/uv.lock 2020-02-02 01:00:00.000000000
+0100
+++ new/langchain_anthropic-1.7.2/uv.lock 2020-02-02 01:00:00.000000000
+0100
@@ -583,7 +583,7 @@
[[package]]
name = "langchain"
-version = "1.3.18"
+version = "1.4.0"
source = { editable = "../../langchain_v1" }
dependencies = [
{ name = "langchain-core" },
@@ -593,6 +593,7 @@
[package.metadata]
requires-dist = [
+ { name = "fastmcp", marker = "extra == 'mcp'", specifier =
">=4.0.1,<5.0.0" },
{ name = "langchain-anthropic", marker = "extra == 'anthropic'", editable
= "." },
{ name = "langchain-aws", marker = "extra == 'aws'" },
{ name = "langchain-azure-ai", marker = "extra == 'azure-ai'" },
@@ -615,12 +616,13 @@
{ name = "langgraph", specifier = ">=1.2.11,<1.3.0" },
{ name = "pydantic", specifier = ">=2.7.4,<3.0.0" },
]
-provides-extras = ["community", "anthropic", "openai", "azure-ai",
"google-vertexai", "google-genai", "fireworks", "ollama", "together",
"mistralai", "huggingface", "groq", "aws", "baseten", "deepseek", "xai",
"perplexity", "meta"]
+provides-extras = ["community", "anthropic", "openai", "azure-ai",
"google-vertexai", "google-genai", "fireworks", "ollama", "together",
"mistralai", "huggingface", "groq", "aws", "baseten", "deepseek", "xai",
"perplexity", "meta", "mcp"]
[package.metadata.requires-dev]
lint = [{ name = "ruff", specifier = ">=0.15.0,<0.17.0" }]
test = [
{ name = "blockbuster", specifier = ">=1.5.26,<1.6.0" },
+ { name = "fastmcp", specifier = ">=4.0.1,<5.0.0" },
{ name = "langchain-openai", editable = "../openai" },
{ name = "langchain-tests", editable = "../../standard-tests" },
{ name = "pytest", specifier = ">=9.0.3,<10.0.0" },
@@ -642,13 +644,14 @@
{ name = "wrapt", specifier = ">=1.15.0,<3.0.0" },
]
typing = [
+ { name = "fastmcp", specifier = ">=4.0.1,<5.0.0" },
{ name = "mypy", specifier = ">=2.1.0,<2.2.0" },
{ name = "types-toml", specifier = ">=0.10.8.20240310,<1.0.0.0" },
]
[[package]]
name = "langchain-anthropic"
-version = "1.7.1"
+version = "1.7.2"
source = { editable = "." }
dependencies = [
{ name = "anthropic" },
@@ -721,7 +724,7 @@
[[package]]
name = "langchain-core"
-version = "1.6.1"
+version = "1.6.2"
source = { editable = "../../core" }
dependencies = [
{ name = "httpx" },