diff --git a/tests/e2e/coverage_registry/llm_conversational.yaml b/tests/e2e/coverage_registry/llm_conversational.yaml index e4e1ac2c7b6..b4d5296d2df 100644 --- a/tests/e2e/coverage_registry/llm_conversational.yaml +++ b/tests/e2e/coverage_registry/llm_conversational.yaml @@ -74,6 +74,9 @@ - {id: llm.responses.openai.vision.nonstream.works, module: llm, tier: P0, subject_endpoint: responses, route: openai, capability: vision, streaming: nonstream, assertions: [works], source: "model_prices json", rationale: "Vision via Responses API"} - {id: llm.responses.anthropic.basic.nonstream.works, module: llm, tier: P1, subject_endpoint: responses, route: anthropic, capability: basic, streaming: nonstream, assertions: [works], source: "response_api_endpoints/endpoints.py:26", rationale: "Responses w/ Anthropic translation (smoke)"} - {id: llm.responses.anthropic.tool_use.nonstream.works, module: llm, tier: P1, subject_endpoint: responses, route: anthropic, capability: tool_use, streaming: nonstream, assertions: [works], source: "model_prices json", rationale: "Responses tool calls w/ Anthropic"} +- {id: llm.responses.bedrock_invoke.compaction.nonstream.output_item, module: llm, tier: P1, subject_endpoint: responses, route: bedrock_invoke, capability: compaction, streaming: nonstream, assertions: [output_item], source: "llms/anthropic/responses_compaction.py", rationale: "An Anthropic compaction block reached over /v1/responses becomes a compaction output item so a stateless client can replay it (GitHub issue #41456)", fail_before_fix: proven} +- {id: llm.responses.bedrock_invoke.compaction.stream.output_item, module: llm, tier: P1, subject_endpoint: responses, route: bedrock_invoke, capability: compaction, streaming: stream, assertions: [output_item], source: "llms/anthropic/responses_compaction.py", rationale: "A streamed Anthropic compaction block surfaces as response.output_item.added and response.output_item.done events carrying encrypted_content (GitHub issue #41456)", fail_before_fix: proven} +- {id: llm.responses.bedrock_invoke.compaction.replay.shrinks_input, module: llm, tier: P1, subject_endpoint: responses, route: bedrock_invoke, capability: compaction, streaming: nonstream, assertions: [shrinks_input], source: "llms/anthropic/responses_compaction.py", rationale: "Replaying the returned compaction item lets Anthropic drop the covered history, so the next request's input_tokens fall below the first call's (GitHub issue #41456)", fail_before_fix: proven} - {id: llm.responses.bedrock_converse.basic.nonstream.works, module: llm, tier: P1, subject_endpoint: responses, route: bedrock_converse, capability: basic, streaming: nonstream, assertions: [works], source: "response_api_endpoints/endpoints.py:26", rationale: "Responses w/ Bedrock Converse (smoke)"} - {id: llm.responses.bedrock_converse.tool_use.nonstream.works, module: llm, tier: P1, subject_endpoint: responses, route: bedrock_converse, capability: tool_use, streaming: nonstream, assertions: [works], source: "model_prices json", rationale: "Responses tool calls w/ Converse"} - {id: llm.responses.vertex.basic.nonstream.works, module: llm, tier: P1, subject_endpoint: responses, route: vertex, capability: basic, streaming: nonstream, assertions: [works], source: "response_api_endpoints/endpoints.py:26", rationale: "Responses w/ Vertex (smoke)"} diff --git a/tests/e2e/coverage_registry/schema.py b/tests/e2e/coverage_registry/schema.py index f3ac1ef8a83..83855df0c61 100644 --- a/tests/e2e/coverage_registry/schema.py +++ b/tests/e2e/coverage_registry/schema.py @@ -65,6 +65,7 @@ LlmCapability = Literal[ "assume_role", "basic", "batch_deployment", + "compaction", "count_tokens", "govcloud_partition", "split_s3_credentials", diff --git a/tests/e2e/llm_translation/test_responses_anthropic_compaction_e2e.py b/tests/e2e/llm_translation/test_responses_anthropic_compaction_e2e.py index 7e954cc5eec..262f4fe9650 100644 --- a/tests/e2e/llm_translation/test_responses_anthropic_compaction_e2e.py +++ b/tests/e2e/llm_translation/test_responses_anthropic_compaction_e2e.py @@ -36,15 +36,6 @@ class _ContextManagementEdit(BaseModel): compact_threshold: int -class _ResponsesInputItem(BaseModel): - model_config = {"extra": "allow"} - type: str | None = None - role: str | None = None - content: object | None = None - id: str | None = None - encrypted_content: str | None = None - - class _ResponsesBody(BaseModel): model_config = {"extra": "allow"} model: str @@ -142,7 +133,7 @@ class TestResponsesAnthropicCompaction: resources.defer(lambda: proxy.delete_model(model_id)) return model - @pytest.mark.covers("llm.responses.anthropic.compaction.nonstream.output_item") + @pytest.mark.covers("llm.responses.bedrock_invoke.compaction.nonstream.output_item") def test_nonstream_returns_compaction_output_item( self, proxy: ProxyClient, resources: ResourceManager, anthropic_model: str ) -> None: @@ -154,7 +145,7 @@ class TestResponsesAnthropicCompaction: assert items, f"no compaction item in output: {result.body[:800]}" assert all(item.encrypted_content for item in items), f"empty encrypted_content: {result.body[:800]}" - @pytest.mark.covers("llm.responses.anthropic.compaction.stream.output_item") + @pytest.mark.covers("llm.responses.bedrock_invoke.compaction.stream.output_item") def test_stream_returns_compaction_item_events( self, proxy: ProxyClient, resources: ResourceManager, anthropic_model: str ) -> None: @@ -172,7 +163,7 @@ class TestResponsesAnthropicCompaction: f"no response.output_item.done compaction item with encrypted_content: {result.stream_events[-6:]}" ) - @pytest.mark.covers("llm.responses.anthropic.compaction.replay.shrinks_input") + @pytest.mark.covers("llm.responses.bedrock_invoke.compaction.replay.shrinks_input") def test_replaying_compaction_item_shrinks_next_input( self, proxy: ProxyClient, resources: ResourceManager, anthropic_model: str ) -> None: