feat(providers): split zai api_key_env from zhipu (#84)
`zai` (api.z.ai, the international front-end) and `zhipu` (open.bigmodel.cn, the China front-end) target the same Zhipu account system but are surfaced as distinct providers in the dashboard. They previously both declared `api_key_env = "ZHIPU_API_KEY"`, so configuring a single Zhipu credential silently activated both — same root cause as the cross-product collisions fixed in librefang-registry#82 and librefang-registry#83. Rename `zai` to use its own `ZAI_API_KEY`. `zhipu` keeps `ZHIPU_API_KEY` as the more-established name. This is a breaking change: existing users authenticating `zai` via `ZHIPU_API_KEY` need to also export `ZAI_API_KEY` (same key value works). The companion daemon-side change will be filed against librefang/librefang. Refs librefang/librefang#3282
This commit is contained in:
1 file changed
+8
-2
+8
-2
@@ -1,10 +1,16 @@
|
|||||||
# Z.AI — https://api.z.ai (Zhipu domain alias)
|
# Z.AI — https://api.z.ai (international front-end of the same Zhipu backend)
|
||||||
# Models: 2
|
# Models: 2
|
||||||
|
#
|
||||||
|
# `zai` and `zhipu` (open.bigmodel.cn) point at the same upstream account
|
||||||
|
# system but are surfaced as distinct providers in the dashboard. Each now
|
||||||
|
# uses its own env so configuring one key doesn't auto-activate both —
|
||||||
|
# export the same Zhipu API key value under whichever name(s) you actually
|
||||||
|
# use. See librefang/librefang#3282.
|
||||||
|
|
||||||
[provider]
|
[provider]
|
||||||
id = "zai"
|
id = "zai"
|
||||||
display_name = "Z.AI"
|
display_name = "Z.AI"
|
||||||
api_key_env = "ZHIPU_API_KEY"
|
api_key_env = "ZAI_API_KEY"
|
||||||
base_url = "https://api.z.ai/api/paas/v4"
|
base_url = "https://api.z.ai/api/paas/v4"
|
||||||
key_required = true
|
key_required = true
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user