Add automatic CPA Management API import after mint

Upload xai-*.json to POST /v0/management/auth-files when cpa_auto_import_remote is enabled. Failures are logged only and never block registration.
This commit is contained in:
chaos committed 2026-07-11 17:47:34 +08:00
1 parent d8e65ae4ef
commit 0d8265de03
5 files changed
+299 -1

No files matched your search

+7
View File
@@ -26,3 +26,10 @@ GROK2API_APP_KEY=
# 代理(config.json 的 proxy / cpa_proxy 为空时会回退到这些)
# https_proxy=http://127.0.0.1:7890
# http_proxy=http://127.0.0.1:7890
# ===== CPA 远程自动导入(Management API)=====
# 写出 xai-*.json 后 POST 到 {CPA_REMOTE_BASE}/v0/management/auth-files
# 需同时在 config.json 设 cpa_auto_import_remote=true,或仅用环境变量时也要打开该开关
# CPA_REMOTE_BASE=http://127.0.0.1:8317
# CPA_REMOTE_PASSWORD=
# 兼容别名:CPA_MANAGEMENT_PASSWORD / MANAGEMENT_PASSWORD