Compare commits

...

1 Commits

Author SHA1 Message Date
xianze 87ed7b7486 feat(compare): 加美团比价前用券透传端点 /intent/precoupon/step
客户端在美团源比价的意图识别前先循环调本端点用券, 透传到 pricebot-backend 的
/api/intent/precoupon/step。同 /intent/step 透传壳: 不鉴权、不做 schema 校验。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-10 19:22:31 +08:00
+11
View File
@@ -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")