{ "version": 1, "caseName": "conversation-session-model-provider-restart-recovery", "spec": "./test/e2e/conversation-session/models/conversation-session-model-provider-restart-recovery.test.ts", "fixtures": [ { "id": "model-provider-restart-title", "description": "重启恢复 case 的标题生成固定响应。", "metadata": { "kind": "common", "timingPolicy": "fast-text", "source": "synthetic", "syntheticReason": "标题生成不属于模型恢复语义。" }, "match": { "method": "POST", "pathIncludes": "/chat/completions", "bodyIncludes": ["Generate a concise title"] }, "response": { "statusCode": 200, "statusMessage": "OK", "headers": { "content-type": "application/json; charset=utf-8" }, "body": "{\"id\":\"model-provider-restart-title\",\"object\":\"chat.completion\",\"created\":0,\"model\":\"deepseek-v4-flash\",\"choices\":[{\"index\":0,\"message\":{\"role\":\"assistant\",\"content\":\"{\\\"title\\\":\\\"Model restart\\\"}\"},\"finish_reason\":\"stop\"}],\"usage\":{\"prompt_tokens\":32,\"completion_tokens\":8,\"total_tokens\":40}}" } }, { "id": "model-provider-restart-title-anthropic", "description": "重启恢复 case 在启动 Anthropic transport 下的标题响应。", "metadata": { "kind": "common", "timingPolicy": "fast-text", "source": "synthetic", "syntheticReason": "重启窗口可能在 seed provider 水合前先恢复启动 provider transport。" }, "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\":\"model-provider-restart-title-anthropic\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"deepseek-v4-flash\",\"content\":[{\"type\":\"text\",\"text\":\"{\\\"title\\\":\\\"Model restart\\\"}\"}],\"stop_reason\":\"end_turn\",\"stop_sequence\":null,\"usage\":{\"input_tokens\":32,\"output_tokens\":8}}" } }, { "id": "model-provider-restart-r01", "description": "I25 重启保留可用 上游 模型。", "metadata": { "kind": "main", "timingPolicy": "fast-text", "source": "synthetic", "syntheticReason": "核心断言是请求模型,响应仅用于稳定收口。" }, "maxMatches": 1, "match": { "method": "POST", "pathIncludes": "/chat/completions", "lastUserMessageIncludes": ["E2E_MODEL_PROVIDER_RESTART_R01"], "bodyExcludes": ["Generate a concise title"] }, "response": { "statusCode": 200, "statusMessage": "OK", "headers": { "content-type": "text/event-stream; charset=utf-8" }, "body": "data: {\"id\":\"model-provider-restart-r01\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"deepseek-v4-flash\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"upstream-e2e-ok\"},\"finish_reason\":null}]}\n\ndata: {\"id\":\"model-provider-restart-r01\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"deepseek-v4-flash\",\"choices\":[{\"index\":0,\"delta\":{},\"finish_reason\":\"stop\"}]}\n\ndata: [DONE]\n\n" } }, { "id": "model-provider-restart-r01-anthropic", "description": "I25 在启动 Anthropic transport 下保留可用 上游 模型。", "metadata": { "kind": "main", "timingPolicy": "fast-text", "source": "synthetic", "syntheticReason": "case 验证 provider/model,允许重启恢复阶段使用启动 transport。" }, "maxMatches": 1, "match": { "method": "POST", "pathIncludes": "/messages", "lastUserMessageIncludes": ["E2E_MODEL_PROVIDER_RESTART_R01"], "bodyExcludes": ["Generate a concise title"] }, "response": { "statusCode": 200, "statusMessage": "OK", "text": { "id": "model-provider-restart-r01-anthropic", "inputTokens": 96, "outputTokens": 8, "text": "upstream-e2e-ok" } } }, { "id": "model-provider-restart-r02", "description": "I26 重启保留 Plan Highspeed。", "metadata": { "kind": "main", "timingPolicy": "fast-text", "source": "synthetic", "syntheticReason": "核心断言是请求模型,响应仅用于稳定收口。" }, "maxMatches": 1, "match": { "method": "POST", "pathIncludes": "/chat/completions", "lastUserMessageIncludes": ["E2E_MODEL_PROVIDER_RESTART_R02"], "bodyExcludes": ["Generate a concise title"] }, "response": { "statusCode": 200, "statusMessage": "OK", "headers": { "content-type": "text/event-stream; charset=utf-8" }, "body": "data: {\"id\":\"model-provider-restart-r02\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"glm-5.2-highspeed-e2e\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"upstream-e2e-ok\"},\"finish_reason\":null}]}\n\ndata: {\"id\":\"model-provider-restart-r02\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"glm-5.2-highspeed-e2e\",\"choices\":[{\"index\":0,\"delta\":{},\"finish_reason\":\"stop\"}]}\n\ndata: [DONE]\n\n" } }, { "id": "model-provider-restart-r03", "description": "I27 的旧 Start Plan 选择失效后回退 Configured Default。", "metadata": { "kind": "main", "timingPolicy": "fast-text", "source": "synthetic", "syntheticReason": "核心断言是失效 Recent 回退后的真实请求模型,响应仅用于稳定收口。" }, "maxMatches": 1, "match": { "method": "POST", "pathIncludes": "/chat/completions", "lastUserMessageIncludes": ["E2E_MODEL_PROVIDER_RESTART_R03"], "bodyExcludes": ["Generate a concise title"] }, "response": { "statusCode": 200, "statusMessage": "OK", "headers": { "content-type": "text/event-stream; charset=utf-8" }, "body": "data: {\"id\":\"model-provider-restart-r03\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"deepseek-v4-flash\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"upstream-e2e-ok\"},\"finish_reason\":null}]}\n\ndata: {\"id\":\"model-provider-restart-r03\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"deepseek-v4-flash\",\"choices\":[{\"index\":0,\"delta\":{},\"finish_reason\":\"stop\"}]}\n\ndata: [DONE]\n\n" } }, { "id": "model-provider-restart-r04", "description": "I28 的已删除模型选择失效后回退 Configured Default。", "metadata": { "kind": "main", "timingPolicy": "fast-text", "source": "synthetic", "syntheticReason": "核心断言是失效 Recent 回退后的真实请求模型,响应仅用于稳定收口。" }, "maxMatches": 1, "match": { "method": "POST", "pathIncludes": "/chat/completions", "lastUserMessageIncludes": ["E2E_MODEL_PROVIDER_RESTART_R04"], "bodyExcludes": ["Generate a concise title"] }, "response": { "statusCode": 200, "statusMessage": "OK", "headers": { "content-type": "text/event-stream; charset=utf-8" }, "body": "data: {\"id\":\"model-provider-restart-r04\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"deepseek-v4-flash\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"upstream-e2e-ok\"},\"finish_reason\":null}]}\n\ndata: {\"id\":\"model-provider-restart-r04\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"deepseek-v4-flash\",\"choices\":[{\"index\":0,\"delta\":{},\"finish_reason\":\"stop\"}]}\n\ndata: [DONE]\n\n" } } ] }