From c450ae516c56a0c6827b698836ce769de3dd9296 Mon Sep 17 00:00:00 2001 From: David McKay Date: Tue, 27 Oct 2026 18:38:44 -0700 Subject: [PATCH 1/2] Read the Anthropic key and API version the 2.x SDK sends in the LangGraph AG-UI test anthropic 2.x sends the key as Authorization: Bearer instead of x-api-key and dates its Messages API version later than 2023-06-01. The provider-boundary test asserted both by their 1.x values, so it failed once the unpinned requirements resolved 2.x. It now reads the key from either header and checks the version is a date; the endpoint, key, model and body it asserts are unchanged. (cherry picked from commit 99685ee51355e6fb3fc4ffbfd258556f91db26c1) --- agent-langgraph-agui/tests/test_provider_boundaries.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/agent-langgraph-agui/tests/test_provider_boundaries.py b/agent-langgraph-agui/tests/test_provider_boundaries.py index a0a824f134..6a4488f4b2 100644 --- a/agent-langgraph-agui/tests/test_provider_boundaries.py +++ b/agent-langgraph-agui/tests/test_provider_boundaries.py @@ -1,5 +1,6 @@ import json import os +import re import shutil import subprocess import sys @@ -337,8 +338,13 @@ async def test_anthropic_selection_reaches_anthropic_boundary_without_openai_key assert result["messages"][0].content == "anthropic proof" assert "OPENAI_API_KEY" not in os.environ assert captured[0]["url"] == "http://127.0.0.1:4311/v1/messages" - assert captured[0]["headers"]["x-api-key"] == "sk-ant-openbot-ci" - assert captured[0]["headers"]["anthropic-version"] == "2023-06-01" + # Anthropic's SDK sends the key as `x-api-key` up to 1.x and as `Authorization: Bearer` from + # 2.x; either is the key reaching Anthropic, which is what this test is about. + bearer = captured[0]["headers"].get("authorization") or "" + key = captured[0]["headers"].get("x-api-key") or bearer.removeprefix("Bearer ") or None + assert key == "sk-ant-openbot-ci" + # The Messages API version is dated, and the SDK picks it: 1.x sends 2023-06-01, 2.x a later date. + assert re.fullmatch(r"\d{4}-\d{2}-\d{2}", captured[0]["headers"]["anthropic-version"]) assert captured[0]["body"]["model"] == request_model assert captured[0]["body"]["messages"] == [ {"role": "user", "content": "Say hello."} From bd9dbfabc59c5aa84dad13ca21d8d7e13be98d6c Mon Sep 17 00:00:00 2001 From: David McKay Date: Tue, 27 Oct 2026 18:38:44 -0700 Subject: [PATCH 2/2] Launch the Chromium build CI installs in the enter-text test CI installs Chromium with --no-shell since #829, and enter-text launched Playwright's default, the separate headless shell, so it failed to start. It now launches channel "chromium", the build the computer itself launches. (cherry picked from commit f220198cb4e8e331dd2005ae89a44fc0708d2855) --- agent-computer/tests/enter-text.test.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/agent-computer/tests/enter-text.test.ts b/agent-computer/tests/enter-text.test.ts index ac9510cfb0..c65e1d1f2c 100644 --- a/agent-computer/tests/enter-text.test.ts +++ b/agent-computer/tests/enter-text.test.ts @@ -40,7 +40,9 @@ let browser: Browser; beforeAll(async () => { if (!asked) return; const { chromium } = await import("playwright"); - browser = await chromium.launch(); + // The build the computer launches and CI installs (`playwright install --no-shell chromium`). + // Playwright's default here is the separate headless shell, which is no longer on the runner. + browser = await chromium.launch({ channel: "chromium" }); }); afterAll(async () => {