mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-13 13:36:15 +00:00
fix(anthropic): remove unneeded beta flags (#32893)
- Beta isn't needed for search result tests anymore - Add TODO for other tests to come back when generally available - Regenerate remote MCP snapshot after some testing (now the same, but fresher) - Bump deps
This commit is contained in:
@@ -998,8 +998,6 @@
|
||||
" ]\n",
|
||||
"```\n",
|
||||
"\n",
|
||||
"We also need to specify the `search-results-2025-06-09` beta when instantiating ChatAnthropic. You can see an end-to-end example below.\n",
|
||||
"\n",
|
||||
"<details>\n",
|
||||
"<summary>End to end example with LangGraph</summary>\n",
|
||||
"\n",
|
||||
|
Binary file not shown.
@@ -942,6 +942,10 @@ def test_web_search() -> None:
|
||||
|
||||
@pytest.mark.vcr
|
||||
def test_code_execution() -> None:
|
||||
"""Note: this is a beta feature.
|
||||
|
||||
TODO: Update to remove beta once generally available.
|
||||
"""
|
||||
llm = ChatAnthropic(
|
||||
model="claude-sonnet-4-20250514", # type: ignore[call-arg]
|
||||
betas=["code-execution-2025-05-22"],
|
||||
@@ -990,6 +994,10 @@ def test_code_execution() -> None:
|
||||
|
||||
@pytest.mark.vcr
|
||||
def test_remote_mcp() -> None:
|
||||
"""Note: this is a beta feature.
|
||||
|
||||
TODO: Update to remove beta once generally available.
|
||||
"""
|
||||
mcp_servers = [
|
||||
{
|
||||
"type": "url",
|
||||
@@ -1047,6 +1055,10 @@ def test_remote_mcp() -> None:
|
||||
|
||||
@pytest.mark.parametrize("block_format", ["anthropic", "standard"])
|
||||
def test_files_api_image(block_format: str) -> None:
|
||||
"""Note: this is a beta feature.
|
||||
|
||||
TODO: Update to remove beta once generally available.
|
||||
"""
|
||||
image_file_id = os.getenv("ANTHROPIC_FILES_API_IMAGE_ID")
|
||||
if not image_file_id:
|
||||
pytest.skip()
|
||||
@@ -1081,6 +1093,10 @@ def test_files_api_image(block_format: str) -> None:
|
||||
|
||||
@pytest.mark.parametrize("block_format", ["anthropic", "standard"])
|
||||
def test_files_api_pdf(block_format: str) -> None:
|
||||
"""Note: this is a beta feature.
|
||||
|
||||
TODO: Update to remove beta once generally available.
|
||||
"""
|
||||
pdf_file_id = os.getenv("ANTHROPIC_FILES_API_PDF_ID")
|
||||
if not pdf_file_id:
|
||||
pytest.skip()
|
||||
@@ -1111,7 +1127,6 @@ def test_search_result_tool_message() -> None:
|
||||
"""Test that we can pass a search result tool message to the model."""
|
||||
llm = ChatAnthropic(
|
||||
model="claude-3-5-haiku-latest", # type: ignore[call-arg]
|
||||
betas=["search-results-2025-06-09"],
|
||||
)
|
||||
|
||||
@tool
|
||||
@@ -1164,7 +1179,6 @@ def test_search_result_tool_message() -> None:
|
||||
def test_search_result_top_level() -> None:
|
||||
llm = ChatAnthropic(
|
||||
model="claude-3-5-haiku-latest", # type: ignore[call-arg]
|
||||
betas=["search-results-2025-06-09"],
|
||||
)
|
||||
input_message = HumanMessage(
|
||||
[
|
||||
|
7
libs/partners/anthropic/uv.lock
generated
7
libs/partners/anthropic/uv.lock
generated
@@ -505,7 +505,7 @@ typing = [
|
||||
|
||||
[[package]]
|
||||
name = "langchain-core"
|
||||
version = "0.3.75"
|
||||
version = "0.3.76"
|
||||
source = { editable = "../../core" }
|
||||
dependencies = [
|
||||
{ name = "jsonpatch" },
|
||||
@@ -563,7 +563,7 @@ typing = [
|
||||
|
||||
[[package]]
|
||||
name = "langchain-tests"
|
||||
version = "0.3.20"
|
||||
version = "0.3.21"
|
||||
source = { editable = "../../standard-tests" }
|
||||
dependencies = [
|
||||
{ name = "httpx" },
|
||||
@@ -602,7 +602,8 @@ test = [{ name = "langchain-core", editable = "../../core" }]
|
||||
test-integration = []
|
||||
typing = [
|
||||
{ name = "langchain-core", editable = "../../core" },
|
||||
{ name = "mypy", specifier = ">=1.17.1,<2" },
|
||||
{ name = "mypy", specifier = ">=1.17.1,<1.18" },
|
||||
{ name = "types-pyyaml", specifier = ">=6.0.12.2,<7.0.0.0" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
Reference in New Issue
Block a user