Tests hardcode expected api_base as https://api.anthropic.com/v1/messages but if ANTHROPIC_BASE_URL is set in the environment the recorded api_base changes, causing a mismatch. Clear both env vars via monkeypatch at the start of each test.