diff --git a/agent-langgraph-agui/requirements-test.txt b/agent-langgraph-agui/requirements-test.txt index e9c0c14818..324f96e752 100644 --- a/agent-langgraph-agui/requirements-test.txt +++ b/agent-langgraph-agui/requirements-test.txt @@ -1,3 +1,2 @@ -langchain-openai==1.6.0 pytest==9.0.2 pytest-asyncio==1.3.0 diff --git a/agent-langgraph-agui/requirements.txt b/agent-langgraph-agui/requirements.txt index 73794e9adb..4d0c550954 100644 --- a/agent-langgraph-agui/requirements.txt +++ b/agent-langgraph-agui/requirements.txt @@ -1,9 +1,17 @@ ag-ui-langgraph==0.0.45 -langgraph +# The model clients, pinned to the set main proved against real models (#1826). Unpinned, +# a fresh resolve takes whatever the LangChain packages released that morning: langchain-anthropic +# 1.7.11 (2026-11-18) changed the anthropic-version header every Anthropic request carries, and only +# CI noticed. Move them on purpose, as one set, never through a fresh resolve. +langgraph==1.2.22 langchain -langchain-openai -langchain-anthropic -langchain-google-genai +langchain-core==1.8.2 +langchain-openai==1.8.1 +langchain-anthropic==1.7.10 +# Not imported by the harness, but its version decides the request langchain-anthropic sends, +# so it moves with the rest of the set rather than on its own. +anthropic==2.10.0 +langchain-google-genai==4.4.3 # google-genai 3.0.0 (2026-11-06) moved generateContent from /v1beta to /v1, which the Gemini # boundary tests catch. Held on 2.x until the move is checked against the models Bots use. google-genai>=2.34,<3 diff --git a/agent-langgraph-agui/tests/test_provider_boundaries.py b/agent-langgraph-agui/tests/test_provider_boundaries.py index a5008e033f..9b2fb710bc 100644 --- a/agent-langgraph-agui/tests/test_provider_boundaries.py +++ b/agent-langgraph-agui/tests/test_provider_boundaries.py @@ -12,7 +12,6 @@ import httpx2 import pytest -from anthropic import Anthropic sys.path.insert(0, str(Path(__file__).resolve().parents[1])) @@ -344,8 +343,13 @@ async def test_anthropic_selection_reaches_anthropic_boundary_without_openai_key headers.get("x-api-key") == "sk-ant-openbot-ci" or headers.get("authorization") == "Bearer sk-ant-openbot-ci" ) - with Anthropic(api_key="sk-ant-openbot-ci") as sdk: - assert headers["anthropic-version"] == sdk.default_headers["anthropic-version"] + # What Anthropic needs is a version it serves, and a request valid under that version, not the + # SDK's default: langchain-anthropic 1.7.11 sends 2023-06-01 on purpose where the SDK defaults + # to 2026-10-21. Both are current (platform.claude.com/docs/en/api/versioning), and every model + # answers on either. 2026-10-21 refuses temperature, top_p and top_k with a 400, so the harness + # sends none of them, and the request is valid whichever version the client picks. + assert headers["anthropic-version"] in {"2023-06-01", "2026-10-21"} + assert not {"temperature", "top_p", "top_k"} & captured[0]["body"].keys() assert captured[0]["body"]["model"] == request_model assert captured[0]["body"]["messages"] == [ {"role": "user", "content": "Say hello."}