fix(route-lab): record host channel reuse limits
This commit is contained in:
@@ -93,6 +93,13 @@
|
||||
- `gpt-5.4-codex2api` / `gpt-5.4-mini-codex2api`
|
||||
- 这轮只解决 “同组多线路” 的第一阶段验证,不代表当前系统已经支持 “同公开模型名双线路 + 显式 route policy”
|
||||
- `codex2api` 当前先按 `https://www.codex2api.com/v1` 作为 API 根地址假设,若 preview/import 失败,需先校正真实 API base URL
|
||||
- 2026-05-28 remote43 真验结论已落地:
|
||||
- `gpt-asxs-route-lab` 可成功导入,artifact:`artifacts/real-host-acceptance/20260528_142205_remote43_gpt-asxs-route-lab_key_import/21-summary.json`
|
||||
- 导入时创建资源:`group_id=8`、`channel_id=7`、`plan_id=7`、`account_id=9`
|
||||
- upstream `asxs` 侧 `/models` 与 `/chat/completions` 为 `200`;但该轮 managed chat 仍返回 `503`,原因是脚本首轮使用了 canonical model `gpt-5.4` 探测,而当前 route-lab 对外 alias 实际是 `gpt-5.4-asxs`
|
||||
- `gpt-codex2api-route-lab` 在尝试复用同一 group 时被宿主直接拒绝,artifact:`artifacts/real-host-acceptance/20260528_142320_remote43_gpt-codex2api-route-lab_key_import/03-import.body.json`
|
||||
- 宿主返回 `409 GROUP_ALREADY_IN_CHANNEL`,错误为:`one or more groups already belong to another channel`
|
||||
- 因此当前真实结论不是“同组多 channel 可继续验证路由策略”,而是 **stock / patched sub2api 当前结构上不允许同一个 group 绑定到第二个 channel**
|
||||
- 2026-05-26 已把“最终用户 -> 公网域名 -> OpenClaw”这一跳补进正式验证口径:
|
||||
- 公网根地址当前统一为 `https://sub.tksea.top`
|
||||
- OpenClaw 本地 `MiniMax` 运行时故障已定位为 `pi-ai/openai-node` 未继承系统 `HTTP(S)_PROXY`,不是 allowlist 或模型名大小写问题
|
||||
|
||||
@@ -60,6 +60,21 @@ Group: GPT Shared 路由实验
|
||||
- `gpt-5.4-codex2api` 命中 `codex2api`
|
||||
- 关闭其中一条上游后,另一条 alias 仍能独立工作
|
||||
|
||||
## 2026-05-28 remote43 实际结果
|
||||
|
||||
- `gpt-asxs-route-lab` 已在 remote43 完成真实导入:
|
||||
- artifact:`artifacts/real-host-acceptance/20260528_142205_remote43_gpt-asxs-route-lab_key_import/21-summary.json`
|
||||
- 导入资源:`group_id=8`、`channel_id=7`、`plan_id=7`、`account_id=9`
|
||||
- upstream `asxs` 的 `/models` 与 `/chat/completions` 为 `200`
|
||||
- `gpt-codex2api-route-lab` 在尝试复用同一 group 时被宿主拒绝:
|
||||
- artifact:`artifacts/real-host-acceptance/20260528_142320_remote43_gpt-codex2api-route-lab_key_import/03-import.body.json`
|
||||
- 宿主返回 `409 GROUP_ALREADY_IN_CHANNEL`
|
||||
- 错误消息:`one or more groups already belong to another channel`
|
||||
- 因此这轮实验已经证明:
|
||||
- 当前宿主允许一个 provider 创建 `group + channel`
|
||||
- 但**不允许第二个 channel 复用同一个 group**
|
||||
- 所以“group = 模型族,channel = 官方/中转线路”的方案 B,在当前 sub2api 宿主约束下不能直接落地
|
||||
|
||||
## 第二轮暂不做
|
||||
|
||||
第二轮是把两条线路都暴露成同一个公开模型名,例如都叫 `gpt-5.4`。
|
||||
|
||||
@@ -257,6 +257,34 @@ crm_curl_json() {
|
||||
curl "${curl_args[@]}"
|
||||
}
|
||||
|
||||
crm_curl_capture() {
|
||||
local method="$1"
|
||||
local path="$2"
|
||||
local header_path="$3"
|
||||
local body_path="$4"
|
||||
local payload="${5:-}"
|
||||
local -a curl_args
|
||||
curl_args=(-sS -D "$header_path" -o "$body_path" -X "$method")
|
||||
if [[ -n "${crm_token:-}" ]]; then
|
||||
curl_args+=(-H "Authorization: Bearer $crm_token")
|
||||
elif [[ -n "${crm_cookie_jar:-}" ]]; then
|
||||
curl_args+=(-b "$crm_cookie_jar" -c "$crm_cookie_jar")
|
||||
else
|
||||
echo "missing CRM auth: set CRM_ADMIN_TOKEN or CRM_COOKIE_JAR/CRM_ADMIN_USERNAME+CRM_ADMIN_PASSWORD" >&2
|
||||
exit 2
|
||||
fi
|
||||
if [[ -n "$payload" ]]; then
|
||||
curl_args+=(
|
||||
-H 'Content-Type: application/json'
|
||||
"${CRM_BASE}${path}"
|
||||
-d "$payload"
|
||||
)
|
||||
else
|
||||
curl_args+=("${CRM_BASE}${path}")
|
||||
fi
|
||||
curl "${curl_args[@]}"
|
||||
}
|
||||
|
||||
ensure_crm_session_cookie() {
|
||||
if [[ -n "$CRM_COOKIE_JAR" ]]; then
|
||||
crm_cookie_jar="$CRM_COOKIE_JAR"
|
||||
@@ -555,11 +583,7 @@ print(json.dumps({
|
||||
PY
|
||||
)"
|
||||
|
||||
curl -sS -D "$ART/02-import.headers.txt" -o "$ART/03-import.body.json" -X POST \
|
||||
-H "Authorization: Bearer $crm_token" \
|
||||
-H 'Content-Type: application/json' \
|
||||
"$CRM_BASE/api/providers/$provider_id/import" \
|
||||
-d "$payload"
|
||||
crm_curl_capture POST "/api/providers/$provider_id/import" "$ART/02-import.headers.txt" "$ART/03-import.body.json" "$payload"
|
||||
sanitize_headers_file "$ART/02-import.headers.txt"
|
||||
|
||||
batch_id="$(python3 - "$ART/03-import.body.json" <<'PY'
|
||||
|
||||
Reference in New Issue
Block a user