feat(compare): 美团比价前用券透传端点 /intent/precoupon/step (#41)
## 背景 客户端在美团源比价的**意图识别前**先循环调本端点用券。app-server 只做透传壳(决策在 pricebot-backend)。 ## 改动 - 新增 `POST /api/v1/intent/precoupon/step` → 透传到 pricebot-backend `/api/intent/precoupon/step` - 同 `/intent/step` 透传壳: 不鉴权、不做 schema 校验, device_id 透传区分设备 ## 测试 - 链路自测(:8770 → :8000) + 真机实测用券成功 ## 关联(跨三仓库, 同名分支 `feat/meituan-precoupon`) - WonderableAI/pricebot-backend - WonderableAI/shaguabijia-app-server - WonderableAI/shaguabijia-app-android **改协议字段需三仓库一起改。** 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: xianze <ze@192.168.0.128> Reviewed-on: #41 Co-authored-by: zhangxianze <zhangxianze@wonderable.ai> Co-committed-by: zhangxianze <zhangxianze@wonderable.ai>
This commit was merged in pull request #41.
This commit is contained in:
@@ -102,6 +102,17 @@ async def intent_step(request: Request) -> dict[str, Any]:
|
||||
return await _passthrough(request, "/api/intent/step")
|
||||
|
||||
|
||||
@router.post(
|
||||
"/intent/precoupon/step",
|
||||
summary="外卖比价 Phase 0 意图识别前先用券 (透传到 pricebot, 仅美团源)",
|
||||
)
|
||||
async def intent_precoupon_step(request: Request) -> dict[str, Any]:
|
||||
# 美团源平台『意图识别前先用券』多帧循环: 客户端在调 /intent/recognize 之前先循环
|
||||
# 调本端点到 done(continue=false)。订单页底部有『点击使用X红包』就自动选最大免费券
|
||||
# 用上, 已用券/无券则首帧秒过。与 /intent/step 同属 intent 域, 复用同一透传壳。
|
||||
return await _passthrough(request, "/api/intent/precoupon/step")
|
||||
|
||||
|
||||
@router.post("/price/step", summary="外卖比价 Phase 2 步进 (透传到 pricebot)")
|
||||
async def price_step(request: Request) -> dict[str, Any]:
|
||||
return await _passthrough(request, "/api/price/step")
|
||||
|
||||
Reference in New Issue
Block a user