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.
This commit is contained in:
Mason Daugherty
2026-06-29 11:15:48 -04:00
committed by GitHub
parent 1e35d8f7a9
commit e7a9a9a728

View File

@@ -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