From 62e786c7161426dfc72991d298311fa4f8149310 Mon Sep 17 00:00:00 2001 From: kerry Date: Sat, 26 Sep 2026 22:03:33 +0000 Subject: [PATCH] test(integration): nest /v1/messages contracts under messages_endpoint/providers Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- tests/integration/README.md | 2 +- tests/integration/_support/manifest.py | 2 +- .../chat_bridge/test_anthropic_messages_fireworks_stop_wire.py | 0 .../providers}/anthropic/test_anthropic_advisor_wire.py | 0 .../anthropic/test_anthropic_legacy_thinking_budget_wire.py | 0 .../anthropic/test_anthropic_messages_timeout_wire.py | 0 .../anthropic/test_anthropic_thinking_signature_retry_wire.py | 0 .../providers}/anthropic/test_anthropic_wire.py | 0 .../providers}/anthropic/test_websearch_interception_wire.py | 0 .../providers}/bedrock/test_bedrock_invoke_tool_search_wire.py | 0 .../bedrock/test_bedrock_messages_web_search_replay_wire.py | 0 .../gemini/test_gemini_messages_cache_control_wire.py | 0 .../test_anthropic_messages_claude_code_cache_key_wire.py | 0 .../test_anthropic_messages_openai_bridge_wire.py | 0 .../test_anthropic_messages_openai_tools_wire.py | 0 .../responses_bridge/test_responses_bridge_stream_options.py | 0 tests/integration/run.py | 2 +- 17 files changed, 3 insertions(+), 3 deletions(-) rename tests/integration/{messages => messages_endpoint}/chat_bridge/test_anthropic_messages_fireworks_stop_wire.py (100%) rename tests/integration/{messages => messages_endpoint/providers}/anthropic/test_anthropic_advisor_wire.py (100%) rename tests/integration/{messages => messages_endpoint/providers}/anthropic/test_anthropic_legacy_thinking_budget_wire.py (100%) rename tests/integration/{messages => messages_endpoint/providers}/anthropic/test_anthropic_messages_timeout_wire.py (100%) rename tests/integration/{messages => messages_endpoint/providers}/anthropic/test_anthropic_thinking_signature_retry_wire.py (100%) rename tests/integration/{messages => messages_endpoint/providers}/anthropic/test_anthropic_wire.py (100%) rename tests/integration/{messages => messages_endpoint/providers}/anthropic/test_websearch_interception_wire.py (100%) rename tests/integration/{messages => messages_endpoint/providers}/bedrock/test_bedrock_invoke_tool_search_wire.py (100%) rename tests/integration/{messages => messages_endpoint/providers}/bedrock/test_bedrock_messages_web_search_replay_wire.py (100%) rename tests/integration/{messages => messages_endpoint/providers}/gemini/test_gemini_messages_cache_control_wire.py (100%) rename tests/integration/{messages => messages_endpoint}/responses_bridge/test_anthropic_messages_claude_code_cache_key_wire.py (100%) rename tests/integration/{messages => messages_endpoint}/responses_bridge/test_anthropic_messages_openai_bridge_wire.py (100%) rename tests/integration/{messages => messages_endpoint}/responses_bridge/test_anthropic_messages_openai_tools_wire.py (100%) rename tests/integration/{messages => messages_endpoint}/responses_bridge/test_responses_bridge_stream_options.py (100%) diff --git a/tests/integration/README.md b/tests/integration/README.md index 1601123038b..1865366123a 100644 --- a/tests/integration/README.md +++ b/tests/integration/README.md @@ -28,7 +28,7 @@ Provider contracts exercise actual TCP requests with synthetic credentials and l Streaming checks send real HTTP transfer chunks, including one-byte partitions, fragmented tools, incomplete transfers and a cancellation barrier. They assert meaningful text, tool arguments, final usage and persisted cost. The Redis recovery case owns a separate database and Redis process, uses the supported one-second circuit-breaker recovery setting, waits for the real subscriber and verifies response data in Redis after restart. CircleCI reuses its existing Redis image for that extra process; it never pulls an image during tests -The `messages/` directory holds `/v1/messages` endpoint contracts grouped by backend subfolder (`anthropic`, `bedrock`, `gemini`, `responses_bridge`, `chat_bridge`) and runs in the providers shard; `run.py` selects test files recursively under each scheduled directory +The `messages_endpoint/` directory holds `/v1/messages` endpoint contracts: native-provider backends under `providers/` (`anthropic`, `bedrock`, `gemini`) and the translation bridges (`responses_bridge`, `chat_bridge`) at the top level. It runs in the providers shard; `run.py` selects test files recursively under each scheduled directory The sdk shard exercises the SDK's own HTTP clients against local protocol peers with no gateway in the path, so a case here fails only when the client library or its wire behavior changes. The HTTP/2 case runs a hypercorn TLS peer offering h2 and http/1.1 over ALPN, drives the sync and async httpx handlers at it with `LITELLM_HTTP2` off and on, and asserts the version both the client and the peer observed on the wire. Put a test here only when it needs no proxy, database or Redis; a case that reaches the gateway belongs in one of the other shards diff --git a/tests/integration/_support/manifest.py b/tests/integration/_support/manifest.py index 0a0d1ca52fd..376c2a515b7 100644 --- a/tests/integration/_support/manifest.py +++ b/tests/integration/_support/manifest.py @@ -10,7 +10,7 @@ OWNED_DIRECTORIES: Final = frozenset( "routing", "providers", "streaming", - "messages", + "messages_endpoint", "configuration", "mcp", "observability", diff --git a/tests/integration/messages/chat_bridge/test_anthropic_messages_fireworks_stop_wire.py b/tests/integration/messages_endpoint/chat_bridge/test_anthropic_messages_fireworks_stop_wire.py similarity index 100% rename from tests/integration/messages/chat_bridge/test_anthropic_messages_fireworks_stop_wire.py rename to tests/integration/messages_endpoint/chat_bridge/test_anthropic_messages_fireworks_stop_wire.py diff --git a/tests/integration/messages/anthropic/test_anthropic_advisor_wire.py b/tests/integration/messages_endpoint/providers/anthropic/test_anthropic_advisor_wire.py similarity index 100% rename from tests/integration/messages/anthropic/test_anthropic_advisor_wire.py rename to tests/integration/messages_endpoint/providers/anthropic/test_anthropic_advisor_wire.py diff --git a/tests/integration/messages/anthropic/test_anthropic_legacy_thinking_budget_wire.py b/tests/integration/messages_endpoint/providers/anthropic/test_anthropic_legacy_thinking_budget_wire.py similarity index 100% rename from tests/integration/messages/anthropic/test_anthropic_legacy_thinking_budget_wire.py rename to tests/integration/messages_endpoint/providers/anthropic/test_anthropic_legacy_thinking_budget_wire.py diff --git a/tests/integration/messages/anthropic/test_anthropic_messages_timeout_wire.py b/tests/integration/messages_endpoint/providers/anthropic/test_anthropic_messages_timeout_wire.py similarity index 100% rename from tests/integration/messages/anthropic/test_anthropic_messages_timeout_wire.py rename to tests/integration/messages_endpoint/providers/anthropic/test_anthropic_messages_timeout_wire.py diff --git a/tests/integration/messages/anthropic/test_anthropic_thinking_signature_retry_wire.py b/tests/integration/messages_endpoint/providers/anthropic/test_anthropic_thinking_signature_retry_wire.py similarity index 100% rename from tests/integration/messages/anthropic/test_anthropic_thinking_signature_retry_wire.py rename to tests/integration/messages_endpoint/providers/anthropic/test_anthropic_thinking_signature_retry_wire.py diff --git a/tests/integration/messages/anthropic/test_anthropic_wire.py b/tests/integration/messages_endpoint/providers/anthropic/test_anthropic_wire.py similarity index 100% rename from tests/integration/messages/anthropic/test_anthropic_wire.py rename to tests/integration/messages_endpoint/providers/anthropic/test_anthropic_wire.py diff --git a/tests/integration/messages/anthropic/test_websearch_interception_wire.py b/tests/integration/messages_endpoint/providers/anthropic/test_websearch_interception_wire.py similarity index 100% rename from tests/integration/messages/anthropic/test_websearch_interception_wire.py rename to tests/integration/messages_endpoint/providers/anthropic/test_websearch_interception_wire.py diff --git a/tests/integration/messages/bedrock/test_bedrock_invoke_tool_search_wire.py b/tests/integration/messages_endpoint/providers/bedrock/test_bedrock_invoke_tool_search_wire.py similarity index 100% rename from tests/integration/messages/bedrock/test_bedrock_invoke_tool_search_wire.py rename to tests/integration/messages_endpoint/providers/bedrock/test_bedrock_invoke_tool_search_wire.py diff --git a/tests/integration/messages/bedrock/test_bedrock_messages_web_search_replay_wire.py b/tests/integration/messages_endpoint/providers/bedrock/test_bedrock_messages_web_search_replay_wire.py similarity index 100% rename from tests/integration/messages/bedrock/test_bedrock_messages_web_search_replay_wire.py rename to tests/integration/messages_endpoint/providers/bedrock/test_bedrock_messages_web_search_replay_wire.py diff --git a/tests/integration/messages/gemini/test_gemini_messages_cache_control_wire.py b/tests/integration/messages_endpoint/providers/gemini/test_gemini_messages_cache_control_wire.py similarity index 100% rename from tests/integration/messages/gemini/test_gemini_messages_cache_control_wire.py rename to tests/integration/messages_endpoint/providers/gemini/test_gemini_messages_cache_control_wire.py diff --git a/tests/integration/messages/responses_bridge/test_anthropic_messages_claude_code_cache_key_wire.py b/tests/integration/messages_endpoint/responses_bridge/test_anthropic_messages_claude_code_cache_key_wire.py similarity index 100% rename from tests/integration/messages/responses_bridge/test_anthropic_messages_claude_code_cache_key_wire.py rename to tests/integration/messages_endpoint/responses_bridge/test_anthropic_messages_claude_code_cache_key_wire.py diff --git a/tests/integration/messages/responses_bridge/test_anthropic_messages_openai_bridge_wire.py b/tests/integration/messages_endpoint/responses_bridge/test_anthropic_messages_openai_bridge_wire.py similarity index 100% rename from tests/integration/messages/responses_bridge/test_anthropic_messages_openai_bridge_wire.py rename to tests/integration/messages_endpoint/responses_bridge/test_anthropic_messages_openai_bridge_wire.py diff --git a/tests/integration/messages/responses_bridge/test_anthropic_messages_openai_tools_wire.py b/tests/integration/messages_endpoint/responses_bridge/test_anthropic_messages_openai_tools_wire.py similarity index 100% rename from tests/integration/messages/responses_bridge/test_anthropic_messages_openai_tools_wire.py rename to tests/integration/messages_endpoint/responses_bridge/test_anthropic_messages_openai_tools_wire.py diff --git a/tests/integration/messages/responses_bridge/test_responses_bridge_stream_options.py b/tests/integration/messages_endpoint/responses_bridge/test_responses_bridge_stream_options.py similarity index 100% rename from tests/integration/messages/responses_bridge/test_responses_bridge_stream_options.py rename to tests/integration/messages_endpoint/responses_bridge/test_responses_bridge_stream_options.py diff --git a/tests/integration/run.py b/tests/integration/run.py index 65b5524506f..b416e4869dd 100644 --- a/tests/integration/run.py +++ b/tests/integration/run.py @@ -14,7 +14,7 @@ GROUPS: Final = MappingProxyType( "management": ("management", "authorization", "configuration"), "accounting": ("pricing", "spend"), "database": ("database",), - "providers": ("providers", "routing", "streaming", "messages"), + "providers": ("providers", "routing", "streaming", "messages_endpoint"), "extensions": ("observability", "compatibility"), "mcp": ("mcp",), "sdk": ("sdk",),