| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178 |
- {
- "version": 1,
- "caseName": "conversation-session-gen-ui-context",
- "spec": "./test/e2e/conversation-session/sharing/conversation-session-gen-ui-context.test.ts",
- "fixtures": [
- {
- "id": "gen-ui-context-title",
- "description": "本例标题旁路响应。",
- "metadata": {
- "kind": "common",
- "source": "synthetic",
- "timingPolicy": "fast-text",
- "syntheticReason": "固定标题旁路回复,避免状态快照用例依赖外部网络。"
- },
- "match": {
- "method": "POST",
- "pathIncludes": "/messages",
- "bodyIncludes": ["Generate a concise title"]
- },
- "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\"}}"
- },
- "maxMatches": 5
- },
- {
- "id": "gen-ui-create",
- "description": "GUC create",
- "metadata": {
- "kind": "main",
- "source": "synthetic",
- "timingPolicy": "fast-text",
- "syntheticReason": "固定页面引用与回复,用实际 UI 操作和 provider 请求验证状态快照。"
- },
- "maxMatches": 1,
- "match": {
- "method": "POST",
- "pathIncludes": "/messages",
- "bodyIncludes": ["E2E_GEN_UI_CREATE"],
- "bodyExcludes": [
- "Generate a concise title",
- "CRITICAL: Respond with TEXT ONLY",
- "E2E_GEN_UI_HOLD",
- "E2E_GEN_UI_QUEUE",
- "E2E_GEN_UI_COLD"
- ]
- },
- "response": {
- "statusCode": 200,
- "text": {
- "id": "gen-ui-create",
- "inputTokens": 80,
- "outputTokens": 20,
- "text": "::visualize{path=\"{{genUiContextPath}}\" title=\"Context fixture\"}"
- }
- }
- },
- {
- "id": "gen-ui-hold",
- "description": "GUC hold",
- "metadata": {
- "kind": "main",
- "source": "synthetic",
- "timingPolicy": "controlled-stream",
- "syntheticReason": "固定页面引用与回复,用实际 UI 操作和 provider 请求验证状态快照。"
- },
- "maxMatches": 1,
- "match": {
- "method": "POST",
- "pathIncludes": "/messages",
- "bodyIncludes": ["E2E_GEN_UI_HOLD"],
- "bodyExcludes": [
- "Generate a concise title",
- "CRITICAL: Respond with TEXT ONLY",
- "E2E_GEN_UI_QUEUE",
- "E2E_GEN_UI_COLD"
- ]
- },
- "response": {
- "statusCode": 200,
- "headers": {
- "content-type": "text/event-stream; charset=utf-8"
- },
- "chunks": [
- {
- "offsetMs": 0,
- "text": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"id\":\"gen-ui-hold\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"deepseek-v4-flash\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"usage\":{\"input_tokens\":80,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":0}}}\n\n"
- },
- {
- "offsetMs": 0,
- "text": "event: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"text\",\"text\":\"\"}}\n\n"
- },
- {
- "offsetMs": 0,
- "text": "event: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"GEN_UI_HOLD_STREAMING \"}}\n\n"
- },
- {
- "offsetMs": 0,
- "text": "event: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"GEN_UI_HOLD_OK\"}}\n\n"
- },
- {
- "offsetMs": 0,
- "text": "event: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0}\n\n"
- },
- {
- "offsetMs": 0,
- "text": "event: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"end_turn\",\"stop_sequence\":null},\"usage\":{\"input_tokens\":80,\"output_tokens\":8}}\n\n"
- },
- {
- "offsetMs": 0,
- "text": "event: message_stop\ndata: {\"type\":\"message_stop\"}\n\n"
- }
- ],
- "releaseAfterChunks": 3
- }
- },
- {
- "id": "gen-ui-queue",
- "description": "GUC queue",
- "metadata": {
- "kind": "main",
- "source": "synthetic",
- "timingPolicy": "fast-text",
- "syntheticReason": "固定页面引用与回复,用实际 UI 操作和 provider 请求验证状态快照。"
- },
- "maxMatches": 1,
- "match": {
- "method": "POST",
- "pathIncludes": "/messages",
- "bodyIncludes": ["E2E_GEN_UI_QUEUE"],
- "bodyExcludes": [
- "Generate a concise title",
- "CRITICAL: Respond with TEXT ONLY",
- "E2E_GEN_UI_COLD"
- ]
- },
- "response": {
- "statusCode": 200,
- "text": {
- "id": "gen-ui-queue",
- "inputTokens": 80,
- "outputTokens": 20,
- "text": "GEN_UI_QUEUE_OK"
- }
- }
- },
- {
- "id": "gen-ui-cold",
- "description": "GUC cold",
- "metadata": {
- "kind": "main",
- "source": "synthetic",
- "timingPolicy": "fast-text",
- "syntheticReason": "固定页面引用与回复,用实际 UI 操作和 provider 请求验证状态快照。"
- },
- "maxMatches": 1,
- "match": {
- "method": "POST",
- "pathIncludes": "/messages",
- "bodyIncludes": ["E2E_GEN_UI_COLD"],
- "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
- },
- "response": {
- "statusCode": 200,
- "text": {
- "id": "gen-ui-cold",
- "inputTokens": 80,
- "outputTokens": 20,
- "text": "GEN_UI_COLD_OK"
- }
- }
- }
- ]
- }
|