From e7a9a9a728c3f386ac66122865cdee26613e60f6 Mon Sep 17 00:00:00 2001 From: Mason Daugherty Date: Mon, 29 Jun 2026 11:15:48 -0400 Subject: [PATCH] fix(anthropic): ignore LangSmith requests in VCR cassettes (#38547) Anthropic integration tests can run with LangSmith tracing enabled in scheduled CI, which sends LangSmith API requests while VCR cassettes are active. Ignore LangSmith ingest endpoints in the Anthropic VCR config so cassette playback only matches Anthropic traffic. ## Changes - Add `api.smith.langchain.com` to the Anthropic VCR `ignore_hosts` configuration while preserving any hosts from the shared base config. - Keep existing Anthropic cassette serialization, request redaction, and response redaction behavior unchanged. --- libs/partners/anthropic/tests/conftest.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libs/partners/anthropic/tests/conftest.py b/libs/partners/anthropic/tests/conftest.py index fb1a34ae8ae..26d854f6711 100644 --- a/libs/partners/anthropic/tests/conftest.py +++ b/libs/partners/anthropic/tests/conftest.py @@ -25,6 +25,10 @@ def vcr_config() -> dict: 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