ac4af582301a4e8a29245dbba767eba31334ddf9
3
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
4062cda781 |
provider: a custom provider at a Token Plan's or Ark's address is asked for no access key (ysm119)
ysm119 on Discord saved a custom provider (no preset) at https://tokenhub.tencentmaas.com/plan/v3 with a plain sk- key on the OpenAI-compatible tab, and its editor asked for a SecretId and SecretKey. AccessKeyVendor decides by host alone, so any provider at a Token Plan's /plan address (or an Ark plan's) got the access-key fields, and a Singapore Token Plan or Ark one also got a Usage card asking for them. Now AsksAccessKey(p) gates the two places a user is asked: the editor's listing (gui/providers.go) and the keyless Usage cards (tencentPlanQuotas, volcPlanQuotas). A preset's provider is asked as before; a custom one only once it has an access key saved (so a key the user did give is still shown and still used for its usage). The host rules themselves are unchanged, since presetAccessKey and the presets read them on providers with no preset of their own. The key itself was already sent as typed: no Tencent signing exists on chat, Responses, the model list or a probe; the access key only reads plan usage. TestCustomTokenHubIsSentAsTyped holds that (Authorization: Bearer <key>, on Chat and Responses). Run on mote (go1.26.8): - go test ./internal/provider ./internal/gui: provider ok; gui red only in TestMainWindowCorners (AppKit, #3949, macOS 27 on mote). - TestPlanCardWithoutAccessKey, TestCustomTokenHubIsSentAsTyped, TestProviderListTellsTencentAccessKey ok. - GUI (node --test, Chromium and WebKit, 5 languages): tencent-access-key, tencent-cloud, volc-access-key, usage-access-key-card, i18n-keys and the provider editor's key files ok, except tencent-cloud's "a region clicked right after the strip scrolled" (#4321, open, same on main). - gofmt -l clean; go vet, GOOS=linux go vet -tags nogui, GOOS=windows go vet on provider, gateway, gui ok. Broken by hand: AsksAccessKey returning AccessKeyVendor(p) always turns TestPlanCardWithoutAccessKey (my-ark gets a card), TestCustomTokenHubIsSentAsTyped and TestProviderListTellsTencentAccessKey (my-tokenhub, my-intl, my-ark asked) red. Not tried: the reporter's real tokenhub key; the real app's editor. |
||
|
|
c47fc516a4 |
provider: Tencent Cloud's Token Plan is at tokenhub.tencentmaas.com/plan (ysm119)
ysm119 (Discord) showed Tencent's docs: Token Plan's OpenAI base is now https://tokenhub.tencentmaas.com/plan/v3 and the Anthropic one on tokenhub.tencentmaas.com is the recommended one, with api.lkeap.cloud.tencent.com marked as going away. Tencent's current pages (product/1823/130060 个人版 overview, 130070 Claude Code, 130071 Codex, 130119 quickstart, 136601 CC Switch, all updated 10-15 to 10-22) give 个人版 the same endpoints as 企业版 China (130659): chat/responses at https://tokenhub.tencentmaas.com/plan/v3, messages at https://tokenhub.tencentmaas.com/plan/anthropic, one sk-tp- key for 通用 and Hy plans. - The tencent-cloud preset's plan region (and the preset default) are at those endpoints, with Responses added (Codex's page uses wire_api "responses"). magpie tells regions apart by endpoint, so the personal and China enterprise regions, now one address, are one: "plan", models the union of both lists. "enterprise" stays an alias (regionAliases, RegionID): a key saved on it, an import link with region=enterprise and `region=enterprise` on the CLI land on plan. Singapore 企业版 (enterprise-intl) is unchanged. - A Tencent Cloud provider saved at the old lkeap /plan/v3 or /plan/anthropic is moved to TokenHub at load (moveEndpoints in normalize), and gains the Responses endpoint when it had chat. A Responses address the user set stays. A provider of no preset (a custom one the user typed lkeap into) keeps its address: that is the user's value, and lkeap still answers today. - An app config still at lkeap (Tencent's OpenClaw page, 130062, still gives it) imports as tencent-cloud at the new endpoints. - Usage: DescribeTokenPlan is 企业版's API (api/1823/132270 lists enterprise products only), and Guangzhou's endpoint now serves 个人版 too, so a Guangzhou provider with no SecretId no longer gets the card asking for one (tcSharedRegion); Singapore's still does. The editor shows the optional SecretId/SecretKey at the plan region, so a personal user sees them too. - docs/subsystems/providers-accounts.md says all of this. Run at the pushed head's base |
||
|
|
8792ee063d |
provider: a Volcengine or Tencent access key is kept through sync, restore, a stale editor and a copy, and a plan card without one says what to give (#1821, Edward4226)
The reporter's Volcengine Agent Plan card vanished: providers.json had
lost accessKeyID/secretAccessKey, and volcPlanQuotas skipped a provider
without them before building any card, so nothing said why.
Writers that dropped the access key, fixed at the cause:
- Sync and restore (Mirror, Restore, davsync take) kept this machine's
access key and balance token only when the incoming provider had no
key at all. A magpie before v0.1.1142 (
|