Repository navigation
feat(minimax): 国际版账户端点走服务端签名 + 307 地区检测,修 CN 网络直连被重定向 - #59
Merged
Merged
Conversation
问题:MiniMax 国际版(minimax-global)在 CN 网络下直连 agent.minimax.io, 账户类端点(签到 / 额度 / 资料)被 307 重定向到 agent.minimaxi.com(CN 域名 家族),签到与额度全部失败,且报错看起来像凭据失效,误导用户重新登录。 实测证据(2026-11-09,CN 网络,绕过代理直连): curl --noproxy '*' -sI https://agent.minimax.io/matrix/api/v1/commerce/get_membership_info → HTTP/1.1 307 Temporary Redirect → Location: https://agent.minimaxi.com/matrix/api/v1/commerce/get_membership_info 同一主机配置代理后 200 正常。 方案(移植自 10Router open-sse 的同款实现): 1. signedMiniMaxRequest():账户动作类端点统一走服务端签名——查询参数 (device_platform/biz_id/app_id/version_code/unix/user_id 等)+ 请求头 双签名(yy = md5(path+search _ {body} md5(unix) ooui), x-signature = md5(ts + SECRET [+ body])),签名值绑定 URL+时间戳+body 2. signedCall():国际版(flavor=global)走 preferProxy 代理优先,CN 版保持 直连不变 3. geoNote():307 跨域名家族时报明确错误「上游被重定向(地区限制)——请为 国际版配置代理后重试」,不再伪装成凭据失效 4. 403 与 401 同样先查 geoNote——403 在国际版场景下同样可能是地区限制 面板(panel.html):openAdd 的浏览器登录下拉过滤从 o.value.split('-')[0] 改为 provOf(o.value).prod——minimax / minimax-global 的 prod 同为 minimax, 按字符串前缀切会把 minimax-global 漏掉;不传 product 时保持上次选择, 避免回落到第一个 qoder 造成加错池。 验证:minimax 专项 28/28 通过;本机 minimax-global 账号实测 quota 正常返回。
1 task done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
问题
MiniMax 国际版(
minimax-global)在 CN 网络下直连agent.minimax.io,账户类端点(签到 / 额度 / 资料)被 307 重定向到agent.minimaxi.com(CN 域名家族),签到与额度全部失败,且报错形似凭据失效,误导用户重新登录。实测证据(2026-11-09,CN 网络,绕过代理直连)
同一主机配置代理后 200 正常。token 本身没问题,是纯地区限制。
方案(移植自 10Router open-sse 的同款实现)
signedMiniMaxRequest():账户动作类端点统一走服务端签名——查询参数(device_platform/biz_id/app_id/version_code/unix/user_id等)+ 请求头双签名:yy=md5(encodeURIComponent(path+search) _ {body} md5(unix) ooui)x-signature=md5(ts + SECRET [+ body])signedCall():国际版(flavor=global)走preferProxy代理优先;CN 版保持直连不变geoNote():307 跨域名家族时报明确错误「上游被重定向(地区限制)——请为国际版配置代理后重试」,不再伪装成凭据失效面板修复(顺带)
openAdd的浏览器登录下拉过滤从o.value.split('-')[0]改为provOf(o.value).prod——minimax/minimax-global的 prod 同为minimax,按字符串前缀切会把minimax-global漏掉;不传 product 时保持上次选择,避免回落到第一个 qoder 造成加错池。验证