{ "version": 1, "caseName": "plugin-extension-views", "spec": "./test/e2e/plugins/extensions/plugin-extension-views.test.ts", "fixtures": [ { "id": "plugin-extension-views-title", "description": "本用例会话标题的既有录制响应。", "match": { "method": "POST", "pathIncludes": "/messages", "bodyIncludes": ["Generate a concise title", "E2E_EXT_VIEW_TPS"] }, "response": { "statusCode": 200, "statusMessage": "OK", "headers": { "content-type": "application/json; charset=utf-8" }, "body": "{\"id\":\"upstream-e2e-title-fixture\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"deepseek-v4-flash\",\"content\":[{\"type\":\"text\",\"text\":\"{\\\"title\\\":\\\"Upstream E2E Fixture\\\"}\"}],\"stop_reason\":\"end_turn\",\"stop_sequence\":null,\"usage\":{\"input_tokens\":125,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":24,\"service_tier\":\"standard\"}}" }, "metadata": { "kind": "common", "source": "synthetic", "timingPolicy": "fast-text", "note": "从 provider-basic.json 的 upstream-title-generic 迁入;标题不属于本用例断言。", "syntheticReason": "沿用既有固定标题辅助响应;标题不属于本用例断言,按专属 prompt marker 匹配,避免后台标题请求消耗主业务响应。" } }, { "id": "plugin-extension-views-stream", "description": "沿用已有录制响应,仅用本用例标记限定请求匹配。", "match": { "method": "POST", "pathIncludes": "/messages", "lastUserMessageIncludes": ["E2E_EXT_VIEW_TPS"], "bodyIncludes": ["E2E_EXT_VIEW_TPS"], "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"] }, "response": { "statusCode": 200, "statusMessage": "OK", "headers": { "cache-control": "no-cache", "content-type": "text/event-stream; charset=utf-8" }, "body": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"id\":\"upstream-e2e-slow-stream\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"deepseek-v4-flash\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"usage\":{\"input_tokens\":120,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":0,\"service_tier\":\"standard\"}}}\n\nevent: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"text\",\"text\":\"\"}}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"deep\"}}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"seek\"}}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"-e2e-ok\"}}\n\nevent: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0}\n\nevent: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"end_turn\",\"stop_sequence\":null},\"usage\":{\"input_tokens\":120,\"output_tokens\":12,\"service_tier\":\"standard\"}}\n\nevent: message_stop\ndata: {\"type\":\"message_stop\"}\n\n", "events": [ { "sequence": 0, "offsetMs": 0, "byteLength": 333, "text": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"id\":\"upstream-e2e-slow-stream\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"deepseek-v4-flash\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"usage\":{\"input_tokens\":120,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":0,\"service_tier\":\"standard\"}}}\n\n" }, { "sequence": 1, "offsetMs": 250, "byteLength": 120, "text": "event: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"text\",\"text\":\"\"}}\n\n" }, { "sequence": 2, "offsetMs": 8000, "byteLength": 118, "text": "event: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"deep\"}}\n\n" }, { "sequence": 3, "offsetMs": 16000, "byteLength": 118, "text": "event: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"seek\"}}\n\n" }, { "sequence": 4, "offsetMs": 24000, "byteLength": 122, "text": "event: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"-e2e-ok\"}}\n\n" }, { "sequence": 5, "offsetMs": 90000, "byteLength": 49, "text": "event: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0}\n\n" }, { "sequence": 6, "offsetMs": 90100, "byteLength": 179, "text": "event: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"end_turn\",\"stop_sequence\":null},\"usage\":{\"input_tokens\":120,\"output_tokens\":12,\"service_tier\":\"standard\"}}\n\n" }, { "sequence": 7, "offsetMs": 90200, "byteLength": 42, "text": "event: message_stop\ndata: {\"type\":\"message_stop\"}\n\n" } ] }, "metadata": { "kind": "main", "source": "synthetic", "timingPolicy": "recorded-stream", "note": "从 provider-basic.json 的 upstream-slow-stream 迁入,响应内容与分块保持不变。", "syntheticReason": "沿用既有固定慢流样本,为真实扩展生成速率与视图状态断言提供稳定时序;保留 8、16、24 秒分块与 90 秒结束,不代表线上模型速度。" } } ] }