| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293 |
- {
- "version": 1,
- "caseName": "conversation-session-claude-anthropic-reasoning-budget",
- "spec": "./test/e2e/conversation-session/models/conversation-session-claude-anthropic-reasoning-budget.test.ts",
- "fixtures": [
- {
- "id": "claude-anthropic-reasoning-budget-title",
- "description": "Claude Anthropic fixed budget case 内的标题生成固定响应,避免严格 case-local replay 依赖其他 case。",
- "metadata": {
- "kind": "common",
- "timingPolicy": "fast-text",
- "source": "synthetic",
- "syntheticReason": "标题生成不是本 case 的产品语义,只需要稳定返回,防止标题请求误命中 low/xhigh 业务 fixture。"
- },
- "match": {
- "method": "POST",
- "pathIncludes": "/messages",
- "bodyIncludes": ["Generate a concise title"]
- },
- "response": {
- "statusCode": 200,
- "statusMessage": "OK",
- "headers": {
- "cache-control": "no-cache",
- "content-type": "application/json; charset=utf-8"
- },
- "body": "{\"id\":\"claude-anthropic-reasoning-budget-title\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"claude-sonnet-4\",\"content\":[{\"type\":\"text\",\"text\":\"{\\\"title\\\":\\\"Claude Reasoning\\\"}\"}],\"stop_reason\":\"end_turn\",\"stop_sequence\":null,\"usage\":{\"input_tokens\":64,\"output_tokens\":8}}"
- }
- },
- {
- "id": "claude-anthropic-reasoning-low-main",
- "description": "I16 Claude 选择 low 思考档位后首发普通文本的固定最终回复,配合抓包断言 Anthropic thinking fixed budget。",
- "metadata": {
- "kind": "main",
- "timingPolicy": "fast-text",
- "source": "synthetic",
- "syntheticReason": "核心断言在 provider/model 身份、Anthropic transport 和 low fixed budget 请求 body;响应只需稳定完成并包含约定文本。"
- },
- "maxMatches": 1,
- "match": {
- "method": "POST",
- "pathIncludes": "/messages",
- "lastUserMessageIncludes": ["E2E_CLAUDE_ANTHROPIC_REASONING_LOW"],
- "bodyIncludes": [
- "E2E_CLAUDE_ANTHROPIC_REASONING_LOW",
- "upstream-e2e-ok",
- "claude-sonnet-4"
- ],
- "bodyExcludes": ["Generate a concise title"]
- },
- "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\":\"claude-anthropic-reasoning-low\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"claude-sonnet-4\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"usage\":{\"input_tokens\":128,\"output_tokens\":0}}}\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\":\"upstream-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\":{\"output_tokens\":12}}\n\nevent: message_stop\ndata: {\"type\":\"message_stop\"}\n\n"
- }
- },
- {
- "id": "claude-anthropic-reasoning-xhigh-main",
- "description": "I16 Claude 从 low 切到 xhigh 后续发普通文本的固定最终回复,配合抓包断言 Anthropic fixed budget 切换。",
- "metadata": {
- "kind": "main",
- "timingPolicy": "fast-text",
- "source": "synthetic",
- "syntheticReason": "核心断言在同一 provider/model 下后续请求切换 xhigh 后的 Anthropic thinking budget;响应只需稳定完成并包含约定文本。"
- },
- "maxMatches": 1,
- "match": {
- "method": "POST",
- "pathIncludes": "/messages",
- "lastUserMessageIncludes": ["E2E_CLAUDE_ANTHROPIC_REASONING_XHIGH"],
- "bodyIncludes": [
- "E2E_CLAUDE_ANTHROPIC_REASONING_XHIGH",
- "upstream-e2e-ok",
- "claude-sonnet-4"
- ],
- "bodyExcludes": ["Generate a concise title"]
- },
- "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\":\"claude-anthropic-reasoning-xhigh\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"claude-sonnet-4\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"usage\":{\"input_tokens\":132,\"output_tokens\":0}}}\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\":\"upstream-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\":{\"output_tokens\":12}}\n\nevent: message_stop\ndata: {\"type\":\"message_stop\"}\n\n"
- }
- }
- ]
- }
|