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-07-22 19:06:33
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-langchain-anthropic (Old)
 and      /work/SRC/openSUSE:Factory/.python-langchain-anthropic.new.24530 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-langchain-anthropic"

Wed Jul 22 19:06:33 2026 rev:2 rq:1367134 version:1.5.0

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/python-langchain-anthropic/python-langchain-anthropic.changes
    2026-07-01 16:35:40.347045430 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-langchain-anthropic.new.24530/python-langchain-anthropic.changes
 2026-07-22 19:08:38.636330182 +0200
@@ -1,0 +2,6 @@
+Wed Jul 22 13:36:59 UTC 2026 - Martin Pluskal <[email protected]>
+
+- Update to 1.5.0
+- Require langchain-core >= 1.5.0
+
+-------------------------------------------------------------------

Old:
----
  langchain_anthropic-1.4.8.tar.gz

New:
----
  langchain_anthropic-1.5.0.tar.gz

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

Other differences:
------------------
++++++ python-langchain-anthropic.spec ++++++
--- /var/tmp/diff_new_pack.Vz2Pkz/_old  2026-07-22 19:08:39.992376642 +0200
+++ /var/tmp/diff_new_pack.Vz2Pkz/_new  2026-07-22 19:08:39.996376780 +0200
@@ -18,7 +18,7 @@
 
 %{?sle15_python_module_pythons}
 Name:           python-langchain-anthropic
-Version:        1.4.8
+Version:        1.5.0
 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.96.0
-Requires:       python-langchain-core >= 1.4.7
+Requires:       python-langchain-core >= 1.5.0
 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.4.7}
+BuildRequires:  %{python_module langchain-core >= 1.5.0}
 BuildRequires:  %{python_module pydantic >= 2.7.4}
 BuildRequires:  %{python_module pytest-asyncio}
 BuildRequires:  %{python_module pytest-mock}

++++++ langchain_anthropic-1.4.8.tar.gz -> langchain_anthropic-1.5.0.tar.gz 
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/langchain_anthropic-1.4.8/PKG-INFO 
new/langchain_anthropic-1.5.0/PKG-INFO
--- old/langchain_anthropic-1.4.8/PKG-INFO      2020-02-02 01:00:00.000000000 
+0100
+++ new/langchain_anthropic-1.5.0/PKG-INFO      2020-02-02 01:00:00.000000000 
+0100
@@ -1,6 +1,6 @@
 Metadata-Version: 2.4
 Name: langchain-anthropic
-Version: 1.4.8
+Version: 1.5.0
 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<1.0.0,>=0.96.0
-Requires-Dist: langchain-core<2.0.0,>=1.4.7
+Requires-Dist: langchain-core<2.0.0,>=1.5.0
 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.4.8/langchain_anthropic/_version.py 
new/langchain_anthropic-1.5.0/langchain_anthropic/_version.py
--- old/langchain_anthropic-1.4.8/langchain_anthropic/_version.py       
2020-02-02 01:00:00.000000000 +0100
+++ new/langchain_anthropic-1.5.0/langchain_anthropic/_version.py       
2020-02-02 01:00:00.000000000 +0100
@@ -1,3 +1,3 @@
 """Version information for `langchain-anthropic`."""
 
-__version__ = "1.4.8"
+__version__ = "1.5.0"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/langchain_anthropic-1.4.8/langchain_anthropic/chat_models.py 
new/langchain_anthropic-1.5.0/langchain_anthropic/chat_models.py
--- old/langchain_anthropic-1.4.8/langchain_anthropic/chat_models.py    
2020-02-02 01:00:00.000000000 +0100
+++ new/langchain_anthropic-1.5.0/langchain_anthropic/chat_models.py    
2020-02-02 01:00:00.000000000 +0100
@@ -161,6 +161,7 @@
     "mcp_toolset",
     "memory_",
     "tool_search_",
+    "advisor_",
 ]
 
 _ANTHROPIC_EXTRA_FIELDS: set[str] = {
@@ -805,6 +806,21 @@
     return False
 
 
+def _reasoning_effort_levels(profile: object) -> tuple[str, ...]:
+    """Return the reasoning-effort levels declared in a model's profile, if 
any.
+
+    Defensive against a missing/malformed profile: an absent `profile`, a
+    non-mapping value, or a missing/non-list `reasoning_effort_levels` value is
+    treated as "no levels declared" rather than raising.
+    """
+    if not isinstance(profile, Mapping):
+        return ()
+    levels = profile.get("reasoning_effort_levels")
+    if not isinstance(levels, (list, tuple)):
+        return ()
+    return tuple(levels)
+
+
 def _is_direct_anthropic_llm_type(llm_type: object) -> bool:
     """Return whether an `_llm_type` reaches Claude via the direct Anthropic 
API.
 
@@ -1005,15 +1021,17 @@
     Examples:
 
     - `#!python {"type": "enabled", "budget_tokens": 10_000}` (pre-4.7 models)
-    - `#!python {"type": "adaptive"}` (Opus 4.6+)
-    - `#!python {"type": "adaptive", "display": "summarized"}` (Opus 4.7+)
-
-    !!! note "Claude Opus 4.7"
-
-        `budget_tokens` is removed on Opus 4.7 — use `{"type": "adaptive"}`
-        with `output_config.effort` to control reasoning effort. Set `display`
-        to `"summarized"` to receive summarized reasoning in the response
-        (default is `"omitted"`).
+    - `#!python {"type": "adaptive"}` (Opus 4.6+, Sonnet 5)
+    - `#!python {"type": "adaptive", "display": "summarized"}` (Opus 4.7+, 
Sonnet 5)
+    - `#!python {"type": "disabled"}` (Sonnet 5, where adaptive thinking is
+      on by default)
+
+    !!! note "Claude Opus 4.7+ and Sonnet 5"
+
+        `budget_tokens` is removed on these models — use `{"type": "adaptive"}`
+        with `output_config.effort` to control reasoning effort. The default
+        `display` is `"omitted"`; set it to `"summarized"` to receive
+        summarized reasoning in the response.
     """
 
     output_config: dict[str, Any] | None = None
@@ -1044,18 +1062,29 @@
     [extended 
output](https://platform.claude.com/docs/en/api/go/beta/messages/create).
     """
 
-    effort: Literal["max", "xhigh", "high", "medium", "low"] | None = None
-    """Convenience shorthand for `output_config.effort`.
-
-    When set, this value takes precedence over any `effort` key inside
-    `output_config`.
+    reasoning_effort: Literal["max", "xhigh", "high", "medium", "low"] | None 
= Field(
+        default=None,
+        alias="effort",
+    )
+    """Reasoning effort.
 
-    Example: `effort="medium"`
+    Configures `output_config.effort`. If `thinking` isn't set explicitly,
+    defaults it to `{"type": "adaptive", "display": "summarized"}`. Can also
+    be passed at call time (for example,
+    `model.invoke(..., reasoning_effort="high")`).
+
+    !!! note "`effort` alias"
+
+        `effort` is also accepted as an alias for this field, at both
+        construction and call time. If both `effort` and `reasoning_effort` are
+        set, `effort` wins (Pydantic's alias-resolution precedence).
 
     !!! note
 
-        Setting `effort` to `'high'` produces exactly the same behavior as 
omitting the
-        parameter altogether.
+        Setting `reasoning_effort` to `'high'` produces exactly the same 
behavior
+        as omitting the parameter altogether.
+
+    Example: `reasoning_effort="medium"`
     """
 
     mcp_servers: list[dict[str, Any]] | None = None
@@ -1087,6 +1116,11 @@
     """
 
     @property
+    def effort(self) -> Literal["max", "xhigh", "high", "medium", "low"] | 
None:
+        """Alias for `reasoning_effort`."""
+        return self.reasoning_effort
+
+    @property
     def _llm_type(self) -> str:
         """Return type of chat model."""
         return "anthropic-chat"
@@ -1236,7 +1270,7 @@
         input_: LanguageModelInput,
         *,
         stop: list[str] | None = None,
-        **kwargs: dict,
+        **kwargs: Any,
     ) -> dict:
         """Get the request payload for the Anthropic API."""
         messages = self._convert_input(input_).to_messages()
@@ -1309,26 +1343,56 @@
             **self.model_kwargs,
             **kwargs,
         }
+        # Captured before `self.thinking` is applied below, so a call-time
+        # `thinking` kwarg counts as "explicitly set" too.
+        thinking_explicitly_set = "thinking" in payload or self.thinking is 
not None
         if self.thinking is not None:
             payload["thinking"] = self.thinking
         if self.inference_geo is not None:
             payload["inference_geo"] = self.inference_geo
 
         # Handle output_config and effort parameter
-        # Priority: self.effort > kwargs output_config > self.output_config
+        # Priority: kwarg `effort`/`reasoning_effort` > kwarg `output_config`
+        # > self.reasoning_effort > self.output_config
         output_config: dict[str, Any] = {}
         if self.output_config:
             output_config.update(self.output_config)
+        reasoning_effort_applied = False
+        if self.reasoning_effort:
+            output_config["effort"] = self.reasoning_effort
+            reasoning_effort_applied = True
         payload_oc = payload.get("output_config")
         if isinstance(payload_oc, dict):
             output_config.update(payload_oc)
 
-        if self.effort:
-            output_config["effort"] = self.effort
+        # Neither `reasoning_effort` nor its `effort` alias are Anthropic API
+        # fields. Pop them so they never leak through as top-level keys.
+        effort_kwarg = payload.pop("effort", None)
+        reasoning_effort_kwarg = payload.pop("reasoning_effort", None)
+        # `effort` wins if both are set at call time, matching the
+        # construction-time alias-resolution precedence 
(`Field(alias="effort")`).
+        reasoning_effort_override = (
+            effort_kwarg if effort_kwarg is not None else 
reasoning_effort_kwarg
+        )
+        if reasoning_effort_override:
+            output_config["effort"] = reasoning_effort_override
+            reasoning_effort_applied = True
 
         if output_config:
             payload["output_config"] = output_config
 
+        # Default adaptive thinking when `reasoning_effort` is set, unless the
+        # caller explicitly provided `thinking`. Gated on `xhigh` support: only
+        # Opus 4.7+/Sonnet 5 accept the adaptive+summarized `thinking` shape —
+        # sending it to an older model (e.g. Opus 4.5, 4.6) is rejected by the
+        # API with "adaptive thinking is not supported on this model".
+        if (
+            reasoning_effort_applied
+            and not thinking_explicitly_set
+            and "xhigh" in _reasoning_effort_levels(self.profile)
+        ):
+            payload["thinking"] = {"type": "adaptive", "display": "summarized"}
+
         if "response_format" in payload:
             # response_format present when using agents.create_agent's 
ProviderStrategy
             # ---
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/langchain_anthropic-1.4.8/langchain_anthropic/data/_profiles.py 
new/langchain_anthropic-1.5.0/langchain_anthropic/data/_profiles.py
--- old/langchain_anthropic-1.4.8/langchain_anthropic/data/_profiles.py 
2020-02-02 01:00:00.000000000 +0100
+++ new/langchain_anthropic-1.5.0/langchain_anthropic/data/_profiles.py 
2020-02-02 01:00:00.000000000 +0100
@@ -16,224 +16,9 @@
 from typing import Any
 
 _PROFILES: dict[str, dict[str, Any]] = {
-    "claude-3-5-haiku-20241022": {
-        "name": "Claude Haiku 3.5",
-        "status": "deprecated",
-        "release_date": "2024-10-22",
-        "last_updated": "2024-10-22",
-        "open_weights": False,
-        "max_input_tokens": 200000,
-        "max_output_tokens": 8192,
-        "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": False,
-        "tool_calling": True,
-        "attachment": True,
-        "temperature": True,
-        "image_url_inputs": True,
-        "pdf_tool_message": True,
-        "image_tool_message": True,
-        "structured_output": False,
-        "tool_call_streaming": True,
-    },
-    "claude-3-5-haiku-latest": {
-        "name": "Claude Haiku 3.5 (latest)",
-        "release_date": "2024-10-22",
-        "last_updated": "2024-10-22",
-        "open_weights": False,
-        "max_input_tokens": 200000,
-        "max_output_tokens": 8192,
-        "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": False,
-        "tool_calling": True,
-        "attachment": True,
-        "temperature": True,
-        "image_url_inputs": True,
-        "pdf_tool_message": True,
-        "image_tool_message": True,
-        "structured_output": False,
-        "tool_call_streaming": True,
-    },
-    "claude-3-5-sonnet-20240620": {
-        "name": "Claude Sonnet 3.5",
-        "status": "deprecated",
-        "release_date": "2024-06-20",
-        "last_updated": "2024-06-20",
-        "open_weights": False,
-        "max_input_tokens": 200000,
-        "max_output_tokens": 8192,
-        "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": False,
-        "tool_calling": True,
-        "attachment": True,
-        "temperature": True,
-        "image_url_inputs": True,
-        "pdf_tool_message": True,
-        "image_tool_message": True,
-        "structured_output": False,
-        "tool_call_streaming": True,
-    },
-    "claude-3-5-sonnet-20241022": {
-        "name": "Claude Sonnet 3.5 v2",
-        "status": "deprecated",
-        "release_date": "2024-10-22",
-        "last_updated": "2024-10-22",
-        "open_weights": False,
-        "max_input_tokens": 200000,
-        "max_output_tokens": 8192,
-        "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": False,
-        "tool_calling": True,
-        "attachment": True,
-        "temperature": True,
-        "image_url_inputs": True,
-        "pdf_tool_message": True,
-        "image_tool_message": True,
-        "structured_output": False,
-        "tool_call_streaming": True,
-    },
-    "claude-3-7-sonnet-20250219": {
-        "name": "Claude Sonnet 3.7",
-        "status": "deprecated",
-        "release_date": "2025-02-19",
-        "last_updated": "2025-02-19",
-        "open_weights": False,
-        "max_input_tokens": 200000,
-        "max_output_tokens": 64000,
-        "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,
-        "attachment": True,
-        "temperature": True,
-        "image_url_inputs": True,
-        "pdf_tool_message": True,
-        "image_tool_message": True,
-        "structured_output": False,
-        "tool_call_streaming": True,
-    },
-    "claude-3-haiku-20240307": {
-        "name": "Claude Haiku 3",
-        "status": "deprecated",
-        "release_date": "2024-03-13",
-        "last_updated": "2024-03-13",
-        "open_weights": False,
-        "max_input_tokens": 200000,
-        "max_output_tokens": 4096,
-        "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": False,
-        "tool_calling": True,
-        "attachment": True,
-        "temperature": True,
-        "image_url_inputs": True,
-        "pdf_tool_message": True,
-        "image_tool_message": True,
-        "structured_output": False,
-        "tool_call_streaming": True,
-    },
-    "claude-3-opus-20240229": {
-        "name": "Claude Opus 3",
-        "status": "deprecated",
-        "release_date": "2024-02-29",
-        "last_updated": "2024-02-29",
-        "open_weights": False,
-        "max_input_tokens": 200000,
-        "max_output_tokens": 4096,
-        "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": False,
-        "tool_calling": True,
-        "attachment": True,
-        "temperature": True,
-        "image_url_inputs": True,
-        "pdf_tool_message": True,
-        "image_tool_message": True,
-        "structured_output": False,
-        "tool_call_streaming": True,
-    },
-    "claude-3-sonnet-20240229": {
-        "name": "Claude Sonnet 3",
-        "status": "deprecated",
-        "release_date": "2024-03-04",
-        "last_updated": "2024-03-04",
-        "open_weights": False,
-        "max_input_tokens": 200000,
-        "max_output_tokens": 4096,
-        "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": False,
-        "tool_calling": True,
-        "attachment": True,
-        "temperature": True,
-        "image_url_inputs": True,
-        "pdf_tool_message": True,
-        "image_tool_message": True,
-        "structured_output": False,
-        "tool_call_streaming": True,
-    },
     "claude-fable-5": {
         "name": "Claude Fable 5",
-        "release_date": "2026-06-09",
+        "release_date": "2026-06-07",
         "last_updated": "2026-06-09",
         "open_weights": False,
         "max_input_tokens": 1000000,
@@ -249,12 +34,12 @@
         "video_outputs": False,
         "reasoning_output": True,
         "tool_calling": True,
+        "structured_output": False,
         "attachment": True,
         "temperature": False,
         "image_url_inputs": True,
         "pdf_tool_message": True,
         "image_tool_message": True,
-        "structured_output": False,
         "tool_call_streaming": True,
     },
     "claude-haiku-4-5": {
@@ -275,12 +60,12 @@
         "video_outputs": False,
         "reasoning_output": True,
         "tool_calling": True,
+        "structured_output": True,
         "attachment": True,
         "temperature": True,
         "image_url_inputs": True,
         "pdf_tool_message": True,
         "image_tool_message": True,
-        "structured_output": True,
         "tool_call_streaming": True,
     },
     "claude-haiku-4-5-20251001": {
@@ -301,42 +86,17 @@
         "video_outputs": False,
         "reasoning_output": True,
         "tool_calling": True,
-        "attachment": True,
-        "temperature": True,
-        "image_url_inputs": True,
-        "pdf_tool_message": True,
-        "image_tool_message": True,
         "structured_output": False,
-        "tool_call_streaming": True,
-    },
-    "claude-opus-4-0": {
-        "name": "Claude Opus 4 (latest)",
-        "release_date": "2025-05-22",
-        "last_updated": "2025-05-22",
-        "open_weights": False,
-        "max_input_tokens": 200000,
-        "max_output_tokens": 32000,
-        "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,
         "attachment": True,
         "temperature": True,
         "image_url_inputs": True,
         "pdf_tool_message": True,
         "image_tool_message": True,
-        "structured_output": False,
         "tool_call_streaming": True,
     },
     "claude-opus-4-1": {
         "name": "Claude Opus 4.1 (latest)",
+        "status": "deprecated",
         "release_date": "2025-08-05",
         "last_updated": "2025-08-05",
         "open_weights": False,
@@ -353,16 +113,17 @@
         "video_outputs": False,
         "reasoning_output": True,
         "tool_calling": True,
+        "structured_output": True,
         "attachment": True,
         "temperature": True,
         "image_url_inputs": True,
         "pdf_tool_message": True,
         "image_tool_message": True,
-        "structured_output": True,
         "tool_call_streaming": True,
     },
     "claude-opus-4-1-20250805": {
         "name": "Claude Opus 4.1",
+        "status": "deprecated",
         "release_date": "2025-08-05",
         "last_updated": "2025-08-05",
         "open_weights": False,
@@ -379,38 +140,12 @@
         "video_outputs": False,
         "reasoning_output": True,
         "tool_calling": True,
-        "attachment": True,
-        "temperature": True,
-        "image_url_inputs": True,
-        "pdf_tool_message": True,
-        "image_tool_message": True,
         "structured_output": False,
-        "tool_call_streaming": True,
-    },
-    "claude-opus-4-20250514": {
-        "name": "Claude Opus 4",
-        "release_date": "2025-05-22",
-        "last_updated": "2025-05-22",
-        "open_weights": False,
-        "max_input_tokens": 200000,
-        "max_output_tokens": 32000,
-        "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,
         "attachment": True,
         "temperature": True,
         "image_url_inputs": True,
         "pdf_tool_message": True,
         "image_tool_message": True,
-        "structured_output": False,
         "tool_call_streaming": True,
     },
     "claude-opus-4-5": {
@@ -431,17 +166,23 @@
         "video_outputs": False,
         "reasoning_output": True,
         "tool_calling": True,
+        "structured_output": True,
         "attachment": True,
         "temperature": True,
         "image_url_inputs": True,
         "pdf_tool_message": True,
         "image_tool_message": True,
-        "structured_output": True,
         "tool_call_streaming": True,
+        "reasoning_effort_levels": [
+            "low",
+            "medium",
+            "high",
+        ],
+        "reasoning_effort_default": "high",
     },
     "claude-opus-4-5-20251101": {
         "name": "Claude Opus 4.5",
-        "release_date": "2025-11-01",
+        "release_date": "2025-11-24",
         "last_updated": "2025-11-01",
         "open_weights": False,
         "max_input_tokens": 200000,
@@ -457,17 +198,23 @@
         "video_outputs": False,
         "reasoning_output": True,
         "tool_calling": True,
+        "structured_output": False,
         "attachment": True,
         "temperature": True,
         "image_url_inputs": True,
         "pdf_tool_message": True,
         "image_tool_message": True,
-        "structured_output": False,
         "tool_call_streaming": True,
+        "reasoning_effort_levels": [
+            "low",
+            "medium",
+            "high",
+        ],
+        "reasoning_effort_default": "high",
     },
     "claude-opus-4-6": {
         "name": "Claude Opus 4.6",
-        "release_date": "2026-02-05",
+        "release_date": "2026-02-04",
         "last_updated": "2026-03-13",
         "open_weights": False,
         "max_input_tokens": 1000000,
@@ -483,17 +230,24 @@
         "video_outputs": False,
         "reasoning_output": True,
         "tool_calling": True,
+        "structured_output": True,
         "attachment": True,
         "temperature": True,
         "image_url_inputs": True,
         "pdf_tool_message": True,
         "image_tool_message": True,
-        "structured_output": True,
         "tool_call_streaming": True,
+        "reasoning_effort_levels": [
+            "low",
+            "medium",
+            "high",
+            "max",
+        ],
+        "reasoning_effort_default": "high",
     },
     "claude-opus-4-7": {
         "name": "Claude Opus 4.7",
-        "release_date": "2026-04-16",
+        "release_date": "2026-04-14",
         "last_updated": "2026-04-16",
         "open_weights": False,
         "max_input_tokens": 1000000,
@@ -509,13 +263,21 @@
         "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,
-        "structured_output": True,
         "tool_call_streaming": True,
+        "reasoning_effort_levels": [
+            "low",
+            "medium",
+            "high",
+            "xhigh",
+            "max",
+        ],
+        "reasoning_effort_default": "high",
     },
     "claude-opus-4-8": {
         "name": "Claude Opus 4.8",
@@ -535,46 +297,28 @@
         "video_outputs": False,
         "reasoning_output": True,
         "tool_calling": True,
-        "attachment": True,
-        "temperature": False,
-        "image_url_inputs": True,
-        "pdf_tool_message": True,
-        "image_tool_message": True,
         "structured_output": False,
-        "tool_call_streaming": True,
-    },
-    "claude-sonnet-4-0": {
-        "name": "Claude Sonnet 4 (latest)",
-        "release_date": "2025-05-22",
-        "last_updated": "2025-05-22",
-        "open_weights": False,
-        "max_input_tokens": 200000,
-        "max_output_tokens": 64000,
-        "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,
         "attachment": True,
-        "temperature": True,
+        "temperature": False,
         "image_url_inputs": True,
         "pdf_tool_message": True,
         "image_tool_message": True,
-        "structured_output": False,
         "tool_call_streaming": True,
+        "reasoning_effort_levels": [
+            "low",
+            "medium",
+            "high",
+            "xhigh",
+            "max",
+        ],
+        "reasoning_effort_default": "high",
     },
-    "claude-sonnet-4-20250514": {
-        "name": "Claude Sonnet 4",
-        "release_date": "2025-05-22",
-        "last_updated": "2025-05-22",
+    "claude-sonnet-4-5": {
+        "name": "Claude Sonnet 4.5 (latest)",
+        "release_date": "2025-09-29",
+        "last_updated": "2025-09-29",
         "open_weights": False,
-        "max_input_tokens": 200000,
+        "max_input_tokens": 1000000,
         "max_output_tokens": 64000,
         "text_inputs": True,
         "image_inputs": True,
@@ -587,20 +331,20 @@
         "video_outputs": False,
         "reasoning_output": True,
         "tool_calling": True,
+        "structured_output": True,
         "attachment": True,
         "temperature": True,
         "image_url_inputs": True,
         "pdf_tool_message": True,
         "image_tool_message": True,
-        "structured_output": False,
         "tool_call_streaming": True,
     },
-    "claude-sonnet-4-5": {
-        "name": "Claude Sonnet 4.5 (latest)",
+    "claude-sonnet-4-5-20250929": {
+        "name": "Claude Sonnet 4.5",
         "release_date": "2025-09-29",
         "last_updated": "2025-09-29",
         "open_weights": False,
-        "max_input_tokens": 200000,
+        "max_input_tokens": 1000000,
         "max_output_tokens": 64000,
         "text_inputs": True,
         "image_inputs": True,
@@ -613,21 +357,21 @@
         "video_outputs": False,
         "reasoning_output": True,
         "tool_calling": True,
+        "structured_output": False,
         "attachment": True,
         "temperature": True,
         "image_url_inputs": True,
         "pdf_tool_message": True,
         "image_tool_message": True,
-        "structured_output": True,
         "tool_call_streaming": True,
     },
-    "claude-sonnet-4-5-20250929": {
-        "name": "Claude Sonnet 4.5",
-        "release_date": "2025-09-29",
-        "last_updated": "2025-09-29",
+    "claude-sonnet-4-6": {
+        "name": "Claude Sonnet 4.6",
+        "release_date": "2026-02-17",
+        "last_updated": "2026-03-13",
         "open_weights": False,
-        "max_input_tokens": 200000,
-        "max_output_tokens": 64000,
+        "max_input_tokens": 1000000,
+        "max_output_tokens": 128000,
         "text_inputs": True,
         "image_inputs": True,
         "audio_inputs": False,
@@ -639,21 +383,28 @@
         "video_outputs": False,
         "reasoning_output": True,
         "tool_calling": True,
+        "structured_output": True,
         "attachment": True,
         "temperature": True,
         "image_url_inputs": True,
         "pdf_tool_message": True,
         "image_tool_message": True,
-        "structured_output": False,
         "tool_call_streaming": True,
-    },
-    "claude-sonnet-4-6": {
-        "name": "Claude Sonnet 4.6",
-        "release_date": "2026-02-17",
-        "last_updated": "2026-03-13",
+        "reasoning_effort_levels": [
+            "low",
+            "medium",
+            "high",
+            "max",
+        ],
+        "reasoning_effort_default": "high",
+    },
+    "claude-sonnet-5": {
+        "name": "Claude Sonnet 5",
+        "release_date": "2026-06-29",
+        "last_updated": "2026-06-30",
         "open_weights": False,
         "max_input_tokens": 1000000,
-        "max_output_tokens": 64000,
+        "max_output_tokens": 128000,
         "text_inputs": True,
         "image_inputs": True,
         "audio_inputs": False,
@@ -665,12 +416,20 @@
         "video_outputs": False,
         "reasoning_output": True,
         "tool_calling": True,
+        "structured_output": False,
         "attachment": True,
-        "temperature": True,
+        "temperature": False,
         "image_url_inputs": True,
         "pdf_tool_message": True,
         "image_tool_message": True,
-        "structured_output": True,
         "tool_call_streaming": 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.4.8/langchain_anthropic/data/profile_augmentations.toml
 
new/langchain_anthropic-1.5.0/langchain_anthropic/data/profile_augmentations.toml
--- 
old/langchain_anthropic-1.4.8/langchain_anthropic/data/profile_augmentations.toml
   2020-02-02 01:00:00.000000000 +0100
+++ 
new/langchain_anthropic-1.5.0/langchain_anthropic/data/profile_augmentations.toml
   2020-02-02 01:00:00.000000000 +0100
@@ -16,15 +16,35 @@
 
 [overrides."claude-sonnet-4-6"]
 structured_output = true
+reasoning_effort_levels = ["low", "medium", "high", "max"]
+reasoning_effort_default = "high"
 
 [overrides."claude-opus-4-1"]
 structured_output = true
 
 [overrides."claude-opus-4-5"]
 structured_output = true
+reasoning_effort_levels = ["low", "medium", "high"]
+reasoning_effort_default = "high"
+
+[overrides."claude-opus-4-5-20251101"]
+reasoning_effort_levels = ["low", "medium", "high"]
+reasoning_effort_default = "high"
 
 [overrides."claude-opus-4-6"]
 structured_output = true
+reasoning_effort_levels = ["low", "medium", "high", "max"]
+reasoning_effort_default = "high"
 
 [overrides."claude-opus-4-7"]
 structured_output = true
+reasoning_effort_levels = ["low", "medium", "high", "xhigh", "max"]
+reasoning_effort_default = "high"
+
+[overrides."claude-opus-4-8"]
+reasoning_effort_levels = ["low", "medium", "high", "xhigh", "max"]
+reasoning_effort_default = "high"
+
+[overrides."claude-sonnet-5"]
+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.4.8/pyproject.toml 
new/langchain_anthropic-1.5.0/pyproject.toml
--- old/langchain_anthropic-1.4.8/pyproject.toml        2020-02-02 
01:00:00.000000000 +0100
+++ new/langchain_anthropic-1.5.0/pyproject.toml        2020-02-02 
01:00:00.000000000 +0100
@@ -20,11 +20,11 @@
     "Topic :: Scientific/Engineering :: Artificial Intelligence",
 ]
 
-version = "1.4.8"
+version = "1.5.0"
 requires-python = ">=3.10.0,<4.0.0"
 dependencies = [
     "anthropic>=0.96.0,<1.0.0",
-    "langchain-core>=1.4.7,<2.0.0",
+    "langchain-core>=1.5.0,<2.0.0",
     "pydantic>=2.7.4,<3.0.0",
 ]
 
@@ -57,7 +57,7 @@
     "langchain-tests>=1.1.9,<2.0.0",
     "langchain>=1.0.0,<2.0.0",
 ]
-lint = ["ruff>=0.13.1,<0.14.0"]
+lint = ["ruff>=0.13.1,<0.16.0"]
 test_integration = ["requests>=2.32.3,<3.0.0"]
 typing = [
     "mypy>=2.1.0,<2.2.0",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/langchain_anthropic-1.4.8/tests/conftest.py 
new/langchain_anthropic-1.5.0/tests/conftest.py
--- old/langchain_anthropic-1.4.8/tests/conftest.py     2020-02-02 
01:00:00.000000000 +0100
+++ new/langchain_anthropic-1.5.0/tests/conftest.py     2020-02-02 
01:00:00.000000000 +0100
@@ -25,6 +25,10 @@
     config["before_record_response"] = remove_response_headers
     config["serializer"] = "yaml.gz"
     config["path_transformer"] = VCR.ensure_suffix(".yaml.gz")
+    config["ignore_hosts"] = [
+        *config.get("ignore_hosts", []),
+        "api.smith.langchain.com",
+    ]
 
     return config
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/langchain_anthropic-1.4.8/tests/integration_tests/test_chat_models.py 
new/langchain_anthropic-1.5.0/tests/integration_tests/test_chat_models.py
--- old/langchain_anthropic-1.4.8/tests/integration_tests/test_chat_models.py   
2020-02-02 01:00:00.000000000 +0100
+++ new/langchain_anthropic-1.5.0/tests/integration_tests/test_chat_models.py   
2020-02-02 01:00:00.000000000 +0100
@@ -1321,6 +1321,65 @@
     assert result.usage_metadata["output_tokens"] > 0
 
 
+def test_reasoning_effort_parameter() -> None:
+    """Test that the standard `reasoning_effort` parameter is accepted by the 
API."""
+    llm = ChatAnthropic(
+        model="claude-opus-4-5-20251101",
+        reasoning_effort="medium",
+        max_tokens=100,
+    )
+
+    result = llm.invoke("Say hello in one sentence")
+
+    assert isinstance(result.content, str)
+    assert len(result.content) > 0
+    assert "model_name" in result.response_metadata
+    assert result.usage_metadata is not None
+    assert result.usage_metadata["input_tokens"] > 0
+    assert result.usage_metadata["output_tokens"] > 0
+
+
+def test_reasoning_effort_call_time_kwarg() -> None:
+    """Test that `reasoning_effort` is accepted as a call-time kwarg."""
+    llm = ChatAnthropic(model="claude-opus-4-5-20251101", max_tokens=100)
+
+    result = llm.invoke("Say hello in one sentence", reasoning_effort="low")
+
+    assert isinstance(result.content, str)
+    assert len(result.content) > 0
+    assert result.usage_metadata is not None
+
+
+def test_reasoning_effort_defaults_adaptive_thinking() -> None:
+    """`reasoning_effort` defaults `thinking` to adaptive on models that 
support it.
+
+    Regression test for a model (Opus 4.7+, Sonnet 5) actually accepting the
+    resulting `{"type": "adaptive", "display": "summarized"}` thinking config,
+    not just that the payload is well-formed locally.
+    """
+    llm = ChatAnthropic(
+        model="claude-opus-4-7",
+        reasoning_effort="xhigh",
+        max_tokens=2_000,
+    )
+
+    # A genuine multi-step problem: adaptive thinking is model-decided, and a
+    # trivial prompt (e.g. "what is 3+4") may not surface a visible `thinking`
+    # block even when accepted, which would make this test flaky.
+    result = llm.invoke(
+        "A farmer has 17 sheep. All but 9 die. Then he buys triple the number "
+        "of remaining sheep, then sells half (rounding down). How many sheep "
+        "does he have now? Show your reasoning step by step."
+    )
+
+    assert isinstance(result.content, list)
+    assert any(
+        isinstance(block, dict) and block.get("type") == "thinking"
+        for block in result.content
+    )
+    assert result.usage_metadata is not None
+
+
 def test_image_tool_calling() -> None:
     """Test tool calling with image inputs."""
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/langchain_anthropic-1.4.8/tests/unit_tests/test_chat_models.py 
new/langchain_anthropic-1.5.0/tests/unit_tests/test_chat_models.py
--- old/langchain_anthropic-1.4.8/tests/unit_tests/test_chat_models.py  
2020-02-02 01:00:00.000000000 +0100
+++ new/langchain_anthropic-1.5.0/tests/unit_tests/test_chat_models.py  
2020-02-02 01:00:00.000000000 +0100
@@ -147,21 +147,17 @@
     llm = ChatAnthropic(model="claude-sonnet-4-5-20250929", 
anthropic_api_key="test")
     assert llm.max_tokens == 64000
 
-    # Test claude-opus-4 models
-    llm = ChatAnthropic(model="claude-opus-4-20250514", 
anthropic_api_key="test")
+    # Test claude-opus-4-1 models
+    llm = ChatAnthropic(model="claude-opus-4-1-20250805", 
anthropic_api_key="test")
     assert llm.max_tokens == 32000
 
-    # Test claude-sonnet-4 models
-    llm = ChatAnthropic(model="claude-sonnet-4-20250514", 
anthropic_api_key="test")
+    # Test claude-haiku-4-5 models
+    llm = ChatAnthropic(model="claude-haiku-4-5-20251001", 
anthropic_api_key="test")
     assert llm.max_tokens == 64000
 
-    # Test claude-3-7-sonnet models
-    llm = ChatAnthropic(model="claude-3-7-sonnet-20250219", 
anthropic_api_key="test")
-    assert llm.max_tokens == 64000
-
-    # Test claude-3-5-haiku models
+    # Test claude-3-5-haiku models (profile removed, should fall back to 4096)
     llm = ChatAnthropic(model="claude-3-5-haiku-20241022", 
anthropic_api_key="test")
-    assert llm.max_tokens == 8192
+    assert llm.max_tokens == 4096
 
     # Test claude-3-haiku models (should default to 4096)
     llm = ChatAnthropic(model="claude-3-haiku-20240307", 
anthropic_api_key="test")
@@ -2579,6 +2575,33 @@
     assert not _is_builtin_tool(regular_tool)
 
 
+def test_advisor_is_builtin_tool() -> None:
+    """Test that advisor_ tools are recognized as built-in and pass through 
bind_tools.
+
+    Regression test for https://github.com/langchain-ai/langchain/issues/38644.
+    advisor_20260301 (Anthropic Advisor native tool) was missing from
+    _BUILTIN_TOOL_PREFIXES, causing bind_tools() to route it through
+    convert_to_anthropic_tool() which crashed with KeyError: 'parameters'.
+    """
+    advisor_tool = {
+        "type": "advisor_20260301",
+        "name": "advisor",
+        "model": MODEL_NAME,
+        "max_uses": 3,
+        "max_tokens": 1024,
+    }
+    assert _is_builtin_tool(advisor_tool)
+
+    # bind_tools() must pass the advisor tool through unchanged, not raise 
KeyError
+    model = ChatAnthropic(model=MODEL_NAME)  # type: ignore[call-arg]
+    bound = model.bind_tools([advisor_tool])
+    payload = bound._get_request_payload(  # type: ignore[attr-defined]
+        [HumanMessage("hello")],
+        **bound.kwargs,  # type: ignore[attr-defined]
+    )
+    assert advisor_tool in payload["tools"]
+
+
 def test_tool_search_beta_headers() -> None:
     """Test that tool search tools auto-append the correct beta headers."""
     # Test regex variant
@@ -2804,7 +2827,7 @@
 
 
 def test_profile() -> None:
-    model = ChatAnthropic(model="claude-sonnet-4-20250514")
+    model = ChatAnthropic(model="claude-sonnet-4-5-20250929")
     assert model.profile
     assert not model.profile["structured_output"]
 
@@ -2830,7 +2853,7 @@
 def test_profile_1m_context_beta() -> None:
     model = ChatAnthropic(model="claude-sonnet-4-5")
     assert model.profile
-    assert model.profile["max_input_tokens"] == 200000
+    assert model.profile["max_input_tokens"] == 1000000
 
     model = ChatAnthropic(model="claude-sonnet-4-5", 
betas=["context-1m-2025-08-07"])
     assert model.profile
@@ -2841,7 +2864,7 @@
         betas=["token-efficient-tools-2025-02-19"],
     )
     assert model.profile
-    assert model.profile["max_input_tokens"] == 200000
+    assert model.profile["max_input_tokens"] == 1000000
 
 
 async def test_model_profile_not_blocking() -> None:
@@ -2878,11 +2901,37 @@
     model = ChatAnthropic(model="claude-opus-4-5-20251101", effort="medium")
     assert model.effort == "medium"
 
-    # Test that effort is added to output_config
     payload = model._get_request_payload("Test query")
     assert payload["output_config"]["effort"] == "medium"
 
 
+def test_effort_call_time_kwarg_does_not_warn() -> None:
+    """Test that a call-time `effort` kwarg never warns.
+
+    `effort` is a permanent alias for `reasoning_effort`, not a deprecated one 
--
+    it's not being removed, so no warning is expected at construction or call
+    time.
+    """
+    model = ChatAnthropic(model="claude-opus-4-5-20251101")
+
+    with warnings.catch_warnings():
+        warnings.simplefilter("error")
+        payload = model._get_request_payload("Test query", effort="high")
+
+    assert payload["output_config"]["effort"] == "high"
+
+
+def test_reasoning_effort_does_not_warn() -> None:
+    """Test that the non-deprecated `reasoning_effort` field never warns."""
+    model = ChatAnthropic(model="claude-opus-4-5-20251101", 
reasoning_effort="high")
+
+    with warnings.catch_warnings():
+        warnings.simplefilter("error")
+        payload = model._get_request_payload("Test query")
+
+    assert payload["output_config"]["effort"] == "high"
+
+
 def test_effort_in_output_config() -> None:
     """Test that effort can be specified in `output_config`."""
     # Test valid effort in output_config
@@ -2903,7 +2952,6 @@
         output_config={"effort": "low"},
     )
 
-    # Top-level effort should take precedence in the payload
     payload = model._get_request_payload("Test query")
     assert payload["output_config"]["effort"] == "high"
 
@@ -2919,6 +2967,160 @@
     assert payload["output_config"] == {"some_future_param": "value"}
 
 
+def test_reasoning_effort_parameter_validation() -> None:
+    """Test that `reasoning_effort` is validated the same as `effort`."""
+    model = ChatAnthropic(model="claude-opus-4-5-20251101", 
reasoning_effort="high")
+    assert model.reasoning_effort == "high"
+
+    with pytest.raises(ValidationError, match="Input should be"):
+        ChatAnthropic(model="claude-opus-4-5-20251101", 
reasoning_effort="invalid")  # type: ignore[arg-type]
+
+
+def test_reasoning_effort_in_output_config_payload() -> None:
+    """Test that a construction-time `reasoning_effort` reaches 
`output_config`."""
+    model = ChatAnthropic(model="claude-opus-4-5-20251101", 
reasoning_effort="medium")
+
+    payload = model._get_request_payload("Test query")
+    assert payload["output_config"]["effort"] == "medium"
+
+
+def test_reasoning_effort_as_call_time_kwarg() -> None:
+    """Test that `reasoning_effort` also works as a call-time keyword argument.
+
+    This is the standard `reasoning_effort` param shared across chat model
+    integrations, so it must work via `model.invoke(..., reasoning_effort=...)`
+    without requiring it to be set on the model instance.
+    """
+    model = ChatAnthropic(model="claude-opus-4-5-20251101")
+
+    payload = model._get_request_payload("Test query", reasoning_effort="low")
+
+    assert payload["output_config"]["effort"] == "low"
+    # Never leaks through as a stray top-level key -- not a real Anthropic 
field.
+    assert "reasoning_effort" not in payload
+
+
+def test_reasoning_effort_call_time_kwarg_overrides_construction_time() -> 
None:
+    """Test that a call-time `reasoning_effort` overrides the instance 
default."""
+    model = ChatAnthropic(model="claude-opus-4-5-20251101", 
reasoning_effort="low")
+
+    payload = model._get_request_payload("Test query", reasoning_effort="high")
+
+    assert payload["output_config"]["effort"] == "high"
+
+
+def test_reasoning_effort_yields_to_effort() -> None:
+    """Test that `effort` still takes precedence over `reasoning_effort`.
+
+    `effort` is a `Field(alias="effort")` on `reasoning_effort`, and Pydantic's
+    alias-resolution precedence has the alias win when both are supplied.
+    """
+    model = ChatAnthropic(
+        model="claude-opus-4-5-20251101",
+        effort="high",
+        reasoning_effort="low",
+    )
+
+    payload = model._get_request_payload("Test query")
+    assert payload["output_config"]["effort"] == "high"
+
+
+def test_reasoning_effort_defaults_adaptive_thinking() -> None:
+    """Test that `reasoning_effort` also defaults `thinking` to adaptive.
+
+    Mirrors the reasoning-effort behavior previously implemented client-side
+    (pairing the effort level with adaptive thinking), so the model actually
+    reasons harder instead of being told a preference with no active
+    reasoning mode to apply it to. Only models whose profile advertises
+    `xhigh` (Opus 4.7+, Sonnet 5) accept this `thinking` shape.
+    """
+    model = ChatAnthropic(model="claude-opus-4-7", reasoning_effort="high")
+
+    payload = model._get_request_payload("Test query")
+
+    assert payload["thinking"] == {"type": "adaptive", "display": "summarized"}
+    assert payload["output_config"]["effort"] == "high"
+
+
+def test_reasoning_effort_as_call_time_kwarg_defaults_adaptive_thinking() -> 
None:
+    """Test that a call-time `reasoning_effort` also defaults `thinking`."""
+    model = ChatAnthropic(model="claude-opus-4-7")
+
+    payload = model._get_request_payload("Test query", reasoning_effort="high")
+
+    assert payload["thinking"] == {"type": "adaptive", "display": "summarized"}
+
+
+def test_reasoning_effort_older_model_does_not_default_thinking() -> None:
+    """Older models must not get an adaptive `thinking` default.
+
+    Regression test: Opus 4.5/4.6 support `reasoning_effort` but reject the
+    adaptive+summarized `thinking` shape with a 400 from the real API
+    ("adaptive thinking is not supported on this model"). Only models whose
+    profile declares `xhigh` support should get the `thinking` default.
+    """
+    model = ChatAnthropic(model="claude-opus-4-5-20251101", 
reasoning_effort="high")
+
+    payload = model._get_request_payload("Test query")
+
+    assert "thinking" not in payload
+    assert payload["output_config"]["effort"] == "high"
+
+
+def test_reasoning_effort_preserves_explicit_construction_time_thinking() -> 
None:
+    """Test that an explicit `thinking` field is not clobbered by 
`reasoning_effort`."""
+    model = ChatAnthropic(
+        model="claude-opus-4-5-20251101",
+        reasoning_effort="high",
+        thinking={"type": "enabled", "budget_tokens": 10_000},
+    )
+
+    payload = model._get_request_payload("Test query")
+
+    assert payload["thinking"] == {"type": "enabled", "budget_tokens": 10_000}
+
+
+def test_reasoning_effort_preserves_explicit_call_time_thinking() -> None:
+    """Test that a call-time `thinking` kwarg is not clobbered by 
`reasoning_effort`."""
+    model = ChatAnthropic(model="claude-opus-4-5-20251101")
+
+    payload = model._get_request_payload(
+        "Test query",
+        reasoning_effort="high",
+        thinking={"type": "disabled"},
+    )
+
+    assert payload["thinking"] == {"type": "disabled"}
+
+
+def test_effort_also_defaults_adaptive_thinking() -> None:
+    """Test that `effort` composes with the adaptive-thinking default too.
+
+    `effort` is a pure alias for `reasoning_effort` (`Field(alias="effort")`),
+    so they behave identically -- including triggering the adaptive `thinking`
+    default on `xhigh`-capable models. There's no separate "narrower" behavior
+    for `effort` anymore, since it's not a separate value.
+    """
+    model = ChatAnthropic(model="claude-opus-4-7", effort="high")
+
+    payload = model._get_request_payload("Test query")
+
+    assert payload["thinking"] == {"type": "adaptive", "display": "summarized"}
+
+
+def test_effort_older_model_does_not_default_thinking() -> None:
+    """Test that `effort` on a non-`xhigh` model still doesn't default 
`thinking`.
+
+    Gated on model support (via the model's profile), not on which field name
+    was used to set the effort level.
+    """
+    model = ChatAnthropic(model="claude-opus-4-5-20251101", effort="high")
+
+    payload = model._get_request_payload("Test query")
+
+    assert "thinking" not in payload
+
+
 def test_extras_with_defer_loading() -> None:
     """Test that extras with `defer_loading` are merged into tool 
definitions."""
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/langchain_anthropic-1.4.8/uv.lock 
new/langchain_anthropic-1.5.0/uv.lock
--- old/langchain_anthropic-1.4.8/uv.lock       2020-02-02 01:00:00.000000000 
+0100
+++ new/langchain_anthropic-1.5.0/uv.lock       2020-02-02 01:00:00.000000000 
+0100
@@ -552,7 +552,7 @@
 
 [[package]]
 name = "langchain"
-version = "1.3.11"
+version = "1.3.14"
 source = { editable = "../../langchain_v1" }
 dependencies = [
     { name = "langchain-core" },
@@ -574,6 +574,7 @@
     { name = "langchain-google-vertexai", marker = "extra == 
'google-vertexai'" },
     { name = "langchain-groq", marker = "extra == 'groq'" },
     { name = "langchain-huggingface", marker = "extra == 'huggingface'" },
+    { name = "langchain-meta", marker = "extra == 'meta'" },
     { name = "langchain-mistralai", marker = "extra == 'mistralai'" },
     { name = "langchain-ollama", marker = "extra == 'ollama'" },
     { name = "langchain-openai", marker = "extra == 'openai'", editable = 
"../openai" },
@@ -583,7 +584,7 @@
     { name = "langgraph", specifier = ">=1.2.5,<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"]
+provides-extras = ["community", "anthropic", "openai", "azure-ai", 
"google-vertexai", "google-genai", "fireworks", "ollama", "together", 
"mistralai", "huggingface", "groq", "aws", "baseten", "deepseek", "xai", 
"perplexity", "meta"]
 
 [package.metadata.requires-dev]
 lint = [{ name = "ruff", specifier = ">=0.15.0,<0.16.0" }]
@@ -616,7 +617,7 @@
 
 [[package]]
 name = "langchain-anthropic"
-version = "1.4.8"
+version = "1.5.0"
 source = { editable = "." }
 dependencies = [
     { name = "anthropic" },
@@ -662,7 +663,7 @@
 ]
 
 [package.metadata.requires-dev]
-lint = [{ name = "ruff", specifier = ">=0.13.1,<0.14.0" }]
+lint = [{ name = "ruff", specifier = ">=0.13.1,<0.16.0" }]
 test = [
     { name = "blockbuster", specifier = ">=1.5.5,<1.6" },
     { name = "defusedxml", specifier = ">=0.7.1,<1.0.0" },
@@ -689,7 +690,7 @@
 
 [[package]]
 name = "langchain-core"
-version = "1.4.8"
+version = "1.4.9"
 source = { editable = "../../core" }
 dependencies = [
     { name = "jsonpatch" },
@@ -793,7 +794,7 @@
     { name = "pytest-recording" },
     { name = "pytest-socket", specifier = ">=0.7.0,<1.0.0" },
     { name = "syrupy", specifier = ">=5.0.0,<6.0.0" },
-    { name = "vcrpy", specifier = ">=8.0.0,<9.0.0" },
+    { name = "vcrpy", specifier = ">=8.2.1,<9.0.0" },
 ]
 
 [package.metadata.requires-dev]

Reply via email to