From 9eedf608e7451b307b85dbe9fd0c2769dad080ee Mon Sep 17 00:00:00 2001 From: Yuneng Jiang Date: Mon, 9 Nov 2026 22:31:39 -0800 Subject: [PATCH] test(vertex_ai): read the bundled beta header config in the prompt caching scope test The test read whatever config the previous test left loaded. The local_beta_headers_config fixture reloads from the hosted file on main at teardown, and since #49409 that file lets vertex_ai send prompt-caching-scope-2026-01-05 as a header, which this line's bundled config does not. --- .../test_vertex_ai_partner_models_anthropic_transformation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/unit/llms/vertex_ai/vertex_ai_partner_models/anthropic/test_vertex_ai_partner_models_anthropic_transformation.py b/tests/unit/llms/vertex_ai/vertex_ai_partner_models/anthropic/test_vertex_ai_partner_models_anthropic_transformation.py index 0a582c95749..582d844418b 100644 --- a/tests/unit/llms/vertex_ai/vertex_ai_partner_models/anthropic/test_vertex_ai_partner_models_anthropic_transformation.py +++ b/tests/unit/llms/vertex_ai/vertex_ai_partner_models/anthropic/test_vertex_ai_partner_models_anthropic_transformation.py @@ -640,7 +640,7 @@ async def test_vertex_ai_anthropic_prompt_caching_does_not_add_beta_header( assert "anthropic_beta" not in json.loads(request.content) -def test_vertex_ai_partner_models_anthropic_remove_prompt_caching_scope_beta_header(): +def test_vertex_ai_partner_models_anthropic_remove_prompt_caching_scope_beta_header(local_beta_headers_config: None) -> None: """ Test that remove_unsupported_beta correctly filters out prompt-caching-scope-2026-01-05 from the anthropic-beta headers.