fix: relabel GLM provider display to Z.ai - #2273
Conversation
GLM is the model family (GLM-5, GLM-5.2...), not the provider/company (Zhipu AI, internationally branded Z.ai). The provider was labelled "GLM" next to models named "GLM-5" — confusing and redundant. This is a display-only rename; the internal provider id 'glm', model ids, aliases, family, registry routing, settings.json keys, env vars (GLM_API_KEY / ZHIPU_API_KEY), stored credentials, and brand color are all unchanged, so existing sessions/configs keep working with no migration. User-facing provider labels updated to "Z.ai": - GlmProvider.displayName (was 'GLM (智谱AI)') - credential-probe providerName (surfaces in health-check errors) - buildSdkConfig missing-key error - credential-discovery BUILT_IN_PROVIDER_ENV_MAP displayName - useModelSwitcher PROVIDER_LABELS (picker group header) - AddProviderModal preset displayName (description stays 'Zhipu AI models', matching the Kimi -> 'Moonshot AI models' precedent) - provider-brand KNOWN_PROVIDER_LABELS (trailing-tag stripper) Model names (GLM-5, GLM-5.1, GLM-5.2, GLM-5-Turbo, GLM-5V-Turbo, GLM-4.7) are intentionally unchanged — GLM is the model name.
lsm
left a comment
There was a problem hiding this comment.
🤖 Review by glm-5.1 (Z.ai)
Model: glm-5.1 | Client: NeoKai | Provider: Z.ai
Recommendation: REQUEST_CHANGES — posting as COMMENT because the PR is authored under the same account (lsm), so GitHub rejects REQUEST_CHANGES/APPROVE on my own PR.
What is correct
The display-only relabel is clean and accurate in every file it touches: provider displayName (glm-provider.ts), credential-probe providerName, buildSdkConfig missing-key error, PROVIDER_LABELS (useModelSwitcher.ts), AddProviderModal preset, credential-discovery.ts displayName, and KNOWN_PROVIDER_LABELS (provider-brand.ts). The doc comment in shared/types.ts is updated too.
Unchanged by design and verified intact: provider id glm, model ids/aliases/family, registry routing, settings.json keys, env vars (GLM_API_KEY/ZHIPU_API_KEY), stored credentials, brand color #7DD3FC. No migration — existing sessions/configs keep working.
I specifically verified the provider-brand.ts change is safe: KNOWN_PROVIDER_LABELS only feeds TRAILING_PROVIDER_TAG (strips trailing (Z.ai) suffixes — no GLM model carries one), and REDUNDANT_BRAND_PREFIXES has no glm entry, so model rows still render as "GLM-5", "GLM-5.2", etc. ✓ Acceptance criterion met on this axis.
Tests pass locally with assertions correctly updated: daemon glm-provider unit 42/42; web useModelSwitcher + provider-brand + AddProviderModal 102/102.
One missed user-facing provider label — P2 (blocks)
packages/daemon/src/lib/agent/query-runner.ts:524
const authError = new Error(
'No authentication configured. Please set up API key for Anthropic or GLM.'
);Here "GLM" is listed as a peer of "Anthropic" — i.e. as the provider/company — in a live, user-facing auth error (fires when no provider auth is configured; surfaced via errorManager.handleError as AUTHENTICATION). This is exactly the provider/company sense the rename targets, and it directly violates acceptance criterion #4 ("a grep for user-facing GLM provider labels confirms none remain that refer to the provider/company"). The completeness grep missed it because query-runner.ts was not in the Key files list.
Fix: Anthropic or GLM → Anthropic or Z.ai. No test asserts this exact string, so it is a clean one-liner with no test coordination needed.
Considered and intentionally not flagged
glm-provider.ts:193 — getAuthStatus returns Set GLM_API_KEY or ZHIPU_API_KEY to enable GLM models. The env-var names are correct to keep, and "GLM models" refers to the model family (GLM-5, GLM-5.2…), which is accurate. Not a defect.
Fix the single line in query-runner.ts:524 and this is ready to re-review / hand to QA.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1b81dc7dc3
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Review feedback on #2273 (P2): the no-auth-configured error in query-runner.ts listed "Anthropic or GLM" — GLM as a peer of Anthropic is the provider/company, which should read Z.ai. Missed in the first pass because query-runner.ts was outside the task's Key files list.
GLM is the model family (GLM-5, GLM-5.2…), not the provider/company (Zhipu AI, internationally branded Z.ai). The provider was labelled "GLM" next to models named "GLM-5" — confusing and redundant.
Change
Display-only rename of every user-facing provider label from GLM → Z.ai. Model names (GLM-5, GLM-5.2, …) are unchanged — GLM is the model name.
displayNameUnchanged (by design — no migration, existing configs keep working)
Provider id
glm, model ids/aliases/family, registry routing,settings.jsonkeys, env vars (GLM_API_KEY/ZHIPU_API_KEY), stored credentials, brand color#7DD3FC, and theProviderLogoZ-mark.Test plan
bun run check(lint + typecheck + knip + guards) passesglm-providerunit + related (provider-service, credential-discovery) passuseModelSwitcher,provider-brand,AddProviderModal,ProvidersSettingspassCloses #770