request.js's shared axios instance times out every admin call at 10s,
but AI matching settings allow the server to wait up to 600s
(aimatching.maxTimeoutSecs) for a real chat/completions round trip.
For shopee product 49915704844 the size dimension had no deterministic
match and genuinely called the model; the frontend cut the connection
before the server replied, which the browser reports as a generic
network failure ("服务器连接异常") that has nothing to do with the
actual cause. Override the timeout on just these two calls instead of
the shared default, which stays tight for every other (fast) admin
request.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VkjpksKeizaRpYXfgD74Lf
The two new suggest-colors/suggest-sizes endpoints were missing from
the purchaser permission matrix, so any non-super-admin account got
"没有该接口访问权限" from AuthCheckRole even after the server was
rebuilt. Add both to AdminAPIs alongside the existing mapping-edit and
preview-auto-size entries so ReconcilePurchaserPermissions seeds the
sys_api/casbin rows on next startup.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VkjpksKeizaRpYXfgD74Lf
Add batch AI suggestion for Shopee color/size spec mapping: a
specContextVersion snapshot guards both the new suggest endpoints and
must be echoed back, short id binding keeps the model from ever
returning a value outside the server-supplied PDD candidates, and
suggestions only prefill the draft above AutoConfirmMinConfidence -
low-confidence answers show the reason but stay unapplied. Every
AI-sourced mapping is still written as pending by the existing
SetMapping rule and needs an explicit operator confirm, same as
before for manual edits.
Server: server/app/goauto/aimatching/suggest.go (batch provider call),
server/app/goauto/shopeeproduct/{context_version,ai_suggest}.go (spec
context version + suggest-colors/suggest-sizes), wired into
handler.go/router.go/service.go.
Web: shopee-products AI 匹配 button on both tabs, low-confidence rows
left for manual pick, pending AI mappings get an explicit 确认 action.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VkjpksKeizaRpYXfgD74Lf